本文整理汇总了Java中org.eclipse.jface.viewers.TreeViewer.update方法的典型用法代码示例。如果您正苦于以下问题:Java TreeViewer.update方法的具体用法?Java TreeViewer.update怎么用?Java TreeViewer.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.viewers.TreeViewer
的用法示例。
在下文中一共展示了TreeViewer.update方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasBeenModified
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
protected synchronized void hasBeenModified() {
if (isInherited()) return;
XMLVector<XMLVector<Object>> xmlv = new XMLVector<XMLVector<Object>>();
for(PropertyTableRowTreeObject rowTreeObject : getChildren()){
XMLVector<Object> row = new XMLVector<Object>(rowTreeObject.getObject());
xmlv.add(row);
}
data = xmlv;
try {
DatabaseObject databaseObject = databaseObjectTreeObject.getObject();
java.beans.PropertyDescriptor databaseObjectPropertyDescriptor = databaseObjectTreeObject.getPropertyDescriptor(getObject());
Method setter = databaseObjectPropertyDescriptor.getWriteMethod();
Object args[] = { data };
setter.invoke(databaseObject, args);
databaseObject.hasChanged = true;
databaseObjectTreeObject.hasBeenModified(true);
}
catch (Exception e) {}
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
viewer.update(databaseObjectTreeObject, null);
}
示例2: rename
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public boolean rename(String newName, Boolean bDialog) {
if (getName().equals(newName))
return true;
IDesignTreeObject dto = getParentDesignTreeObject();
if (((DesignDocumentTreeObject)dto).hasUpdate(newName)) {
ConvertigoPlugin.logException(new ConvertigoException("The function named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
return false;
}
getObject().setName(newName);
hasBeenModified();
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
viewer.update(this, null);
return true;
}
示例3: rename
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
public boolean rename(String newName, Boolean bDialog) {
if (getName().equals(newName))
return true;
if (getParentDesignTreeObject().hasView(newName)) {
ConvertigoPlugin.logException(new ConvertigoException("The view named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
return false;
}
getObject().setName(newName);
hasBeenModified();
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
viewer.update(this, null);
return true;
}
示例4: rename
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public boolean rename(String newName, Boolean bDialog) {
if (getName().equals(newName))
return true;
IDesignTreeObject dto = getParentDesignTreeObject();
if (((DesignDocumentTreeObject)dto).hasFilter(newName)) {
ConvertigoPlugin.logException(new ConvertigoException("The function named \"" + newName + "\" already exists."), "Unable to change the object name.", bDialog);
return false;
}
getObject().setName(newName);
hasBeenModified();
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
viewer.update(this, null);
return true;
}
示例5: setPropertyValue
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
@Override
public void setPropertyValue(Object id, Object value) {
DatabaseObject dbo = getObject();
if (dbo instanceof UIDynamicElement) {
IonBean ionBean = ((UIDynamicElement)dbo).getIonBean();
if (ionBean != null) {
if (ionBean.hasProperty((String)id)) {
Object oldValue = ionBean.getPropertyValue((String)id);
if (value != null && !value.equals(oldValue)) {
if (value instanceof String) {
value = new MobileSmartSourceType((String) value);
}
ionBean.setPropertyValue((String)id, value);
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
hasBeenModified(true);
viewer.update(this, null);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(this, (String)id, oldValue, value);
ConvertigoPlugin.projectManager.getProjectExplorerView().fireTreeObjectPropertyChanged(treeObjectEvent);
return;
}
}
}
}
super.setPropertyValue(id, value);
}
示例6: setPropertyValue
import org.eclipse.jface.viewers.TreeViewer; //导入方法依赖的package包/类
public void setPropertyValue(Object id, Object value) {
hasBeenModified();
TreeViewer viewer = (TreeViewer) getAdapter(TreeViewer.class);
viewer.update(this, null);
}