bug TDI-21143 fixed : Studio repository view : remove all refresh call to repo view
git-svn-id: http://talendforge.org/svn/tos/trunk@90354 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
@@ -94,38 +94,40 @@ public final class RepositoryManager {
|
||||
* for editorProperties
|
||||
*/
|
||||
public static void refreshEditorPropertiesNode(ERepositoryObjectType type) {
|
||||
if (isRefreshManually() || !isRefreshCreated()) {
|
||||
refresh(type);
|
||||
} else {
|
||||
IRepositoryView repositoryView = getRepositoryView();
|
||||
if (repositoryView != null) {
|
||||
repositoryView.refresh();
|
||||
}
|
||||
}
|
||||
if (type != null) {
|
||||
syncRoutineAndJoblet(type);
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// if (isRefreshManually() || !isRefreshCreated()) {
|
||||
// refresh(type);
|
||||
// } else {
|
||||
// IRepositoryView repositoryView = getRepositoryView();
|
||||
// if (repositoryView != null) {
|
||||
// repositoryView.refresh();
|
||||
// }
|
||||
// }
|
||||
// if (type != null) {
|
||||
// syncRoutineAndJoblet(type);
|
||||
// }
|
||||
}
|
||||
|
||||
public static void refreshCreatedNode(IProjectRepositoryNode projectNode, ERepositoryObjectType type) {
|
||||
IRepositoryView repositoryView = getRepositoryView();
|
||||
if (repositoryView != null) {
|
||||
if ((isRefreshManually() || !isRefreshCreated()) && !type.isSubItem()) {
|
||||
if (projectNode != null) {
|
||||
RepositoryNode rootNode = (RepositoryNode) projectNode.getRootRepositoryNode(type);
|
||||
repositoryView.refreshAllChildNodes(rootNode);
|
||||
} else {
|
||||
// main project
|
||||
refresh(type);
|
||||
}
|
||||
} else {
|
||||
repositoryView.refresh();
|
||||
}
|
||||
// qli modified to fix the bug 6659.
|
||||
if (type != null) {
|
||||
syncRoutineAndJoblet(type);
|
||||
}
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// IRepositoryView repositoryView = getRepositoryView();
|
||||
// if (repositoryView != null) {
|
||||
// if ((isRefreshManually() || !isRefreshCreated()) && !type.isSubItem()) {
|
||||
// if (projectNode != null) {
|
||||
// RepositoryNode rootNode = (RepositoryNode) projectNode.getRootRepositoryNode(type);
|
||||
// repositoryView.refreshAllChildNodes(rootNode);
|
||||
// } else {
|
||||
// // main project
|
||||
// refresh(type);
|
||||
// }
|
||||
// } else {
|
||||
// repositoryView.refresh();
|
||||
// }
|
||||
// // qli modified to fix the bug 6659.
|
||||
// if (type != null) {
|
||||
// syncRoutineAndJoblet(type);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +167,7 @@ public final class RepositoryManager {
|
||||
// }
|
||||
//
|
||||
// } else {
|
||||
repositoryView.refresh();
|
||||
// repositoryView.refresh();
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -175,17 +177,18 @@ public final class RepositoryManager {
|
||||
* for save
|
||||
*/
|
||||
public static void refreshSavedNode(RepositoryNode node) {
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
IRepositoryView repositoryView = getRepositoryView();
|
||||
if (repositoryView != null) {
|
||||
if (isRefreshManually() || !isRefreshSaved()) {
|
||||
repositoryView.refresh(node);
|
||||
} else {
|
||||
repositoryView.refresh();
|
||||
}
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// if (node == null) {
|
||||
// return;
|
||||
// }
|
||||
// IRepositoryView repositoryView = getRepositoryView();
|
||||
// if (repositoryView != null) {
|
||||
// if (isRefreshManually() || !isRefreshSaved()) {
|
||||
// repositoryView.refresh(node);
|
||||
// } else {
|
||||
// repositoryView.refresh();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,22 +196,24 @@ public final class RepositoryManager {
|
||||
*
|
||||
*/
|
||||
public static void refresh(ERepositoryObjectType type) {
|
||||
if (type != null) {
|
||||
IRepositoryView repositoryView = getRepositoryView();
|
||||
if (repositoryView != null) {
|
||||
repositoryView.refresh(type);
|
||||
repositoryView.refresh();
|
||||
}
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// if (type != null) {
|
||||
// IRepositoryView repositoryView = getRepositoryView();
|
||||
// if (repositoryView != null) {
|
||||
// repositoryView.refresh(type);
|
||||
// repositoryView.refresh();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public static void refresh(Set<ERepositoryObjectType> types) {
|
||||
IRepositoryView repositoryView = getRepositoryView();
|
||||
if (types != null && repositoryView != null) {
|
||||
for (ERepositoryObjectType type : types) {
|
||||
repositoryView.refresh(type);
|
||||
}
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// IRepositoryView repositoryView = getRepositoryView();
|
||||
// if (types != null && repositoryView != null) {
|
||||
// for (ERepositoryObjectType type : types) {
|
||||
// repositoryView.refresh(type);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -192,10 +192,11 @@ public abstract class AContextualAction extends Action implements ITreeContextua
|
||||
* Convenience method user to refresh view on wich action had been called.
|
||||
*/
|
||||
public void refresh() {
|
||||
IRepositoryView viewPart = getViewPart();
|
||||
if (viewPart != null) {
|
||||
viewPart.refresh();
|
||||
}
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// IRepositoryView viewPart = getViewPart();
|
||||
// if (viewPart != null) {
|
||||
// viewPart.refresh();
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,7 +207,8 @@ public abstract class AContextualAction extends Action implements ITreeContextua
|
||||
public void refresh(Object obj) {
|
||||
IRepositoryView viewPart = getViewPart();
|
||||
if (viewPart != null) {
|
||||
viewPart.refresh(obj);
|
||||
// TDI-21143 : Studio repository view : remove all refresh call to repo view
|
||||
// viewPart.refresh(obj);
|
||||
viewPart.expand(obj, true);
|
||||
}
|
||||
}
|
||||
@@ -454,7 +456,7 @@ public abstract class AContextualAction extends Action implements ITreeContextua
|
||||
if (repositoryNode.getContentType() == type) {
|
||||
foundNode = repositoryNode;
|
||||
} else {
|
||||
foundNode = searchRepositoryNode((RepositoryNode) repositoryNode, type);
|
||||
foundNode = searchRepositoryNode(repositoryNode, type);
|
||||
}
|
||||
if (foundNode != null) {
|
||||
return (RepositoryNode) foundNode;
|
||||
@@ -590,9 +592,6 @@ public abstract class AContextualAction extends Action implements ITreeContextua
|
||||
exist = true;
|
||||
doRun();
|
||||
}
|
||||
if (!exist) {
|
||||
refreshRelatedItem(getOldItem());
|
||||
}
|
||||
} else {
|
||||
doRun();
|
||||
}
|
||||
@@ -684,17 +683,6 @@ public abstract class AContextualAction extends Action implements ITreeContextua
|
||||
return this.oldItem;
|
||||
}
|
||||
|
||||
protected void refreshRelatedItem(Item item) {
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
IRepositoryView viewPart = getViewPart();
|
||||
if (viewPart != null) {
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
viewPart.refresh(itemType);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the node.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user