Java 类org.eclipse.jface.viewers.IBasicPropertyConstants 实例源码

项目:NEXCORE-UML-Modeler    文件:ProjectUtil.java   
/**
 * updateParentInExplorer
 *  
 * @param target void
 */
public static void updateParentInExplorer(EObject target) {
    if (null == target) {
        return;
    }
    CommonViewer commonViewer = ViewerRegistry.getViewer();
    if (commonViewer.getControl().isDisposed()) {
        return;
    }
    if (target instanceof DynamicEObjectImpl) {
        target = UMLUtil.getBaseElement(target);
    }
    ITreeNode targetNode = null;
    EObject parent = UMLManager.getParent((Element) target);
    targetNode = UMLTreeNodeRegistry.getTreeNode(parent);
    String[] flags = null;
    flags = new String[] { IBasicPropertyConstants.P_IMAGE, IBasicPropertyConstants.P_TEXT,
        IBasicPropertyConstants.P_CHILDREN };
    commonViewer.update(targetNode, flags);
}
项目:NEXCORE-UML-Modeler    文件:ProjectUtil.java   
/**
 * updateExplorer
 *  
 * @param target
 * @param childIncluded void
 */
public static void updateExplorer(EObject target, boolean childIncluded) {
    if (null == target) {
        return;
    }
    if (target instanceof EAnnotation) {
        return;
    }
    CommonViewer commonViewer = ViewerRegistry.getViewer();
    if (commonViewer.getControl().isDisposed()) {
        return;
    }
    if (target instanceof DynamicEObjectImpl) {
        target = UMLUtil.getBaseElement(target);
    }
    ITreeNode targetNode = null;
    targetNode = UMLTreeNodeRegistry.getTreeNode(target);
    if (null == targetNode) {
        return;
    }
    String[] flags = null;
    if (childIncluded) {
        flags = new String[] { IBasicPropertyConstants.P_IMAGE, IBasicPropertyConstants.P_TEXT,
            IBasicPropertyConstants.P_CHILDREN };
    } else {
        flags = new String[] { IBasicPropertyConstants.P_IMAGE, IBasicPropertyConstants.P_TEXT };
    }
    try {
        commonViewer.update(targetNode, flags);
        commonViewer.refresh(targetNode);
    } catch (Exception ex) {
        Log.error(ex);
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaElementContentProvider.java   
private void updatePackageIcon(final IJavaElement element) {
    postRunnable(new Runnable() {
    public void run() {
        // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
        Control ctrl= fViewer.getControl();
        if (ctrl != null && !ctrl.isDisposed())
            fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion    文件:PackageExplorerContentProvider.java   
/**
* Updates the package icon
* @param element the element to update
* @param runnables the resulting view changes as runnables (type {@link Runnable})
*/
private void postUpdateIcon(final IJavaElement element, Collection<Runnable> runnables) {
 runnables.add(new Runnable() {
    public void run() {
        // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
        fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaBrowsingContentProvider.java   
/**
* Updates the package icon
*/
private void postUpdateIcon(final IJavaElement element) {
    postRunnable(new Runnable() {
    public void run() {
        Control ctrl= fViewer.getControl();
        if (ctrl != null && !ctrl.isDisposed())
            fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaElementContentProvider.java   
private void updatePackageIcon(final IJavaElement element) {
    postRunnable(new Runnable() {
    public void run() {
        // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
        Control ctrl= fViewer.getControl();
        if (ctrl != null && !ctrl.isDisposed())
            fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PackageExplorerContentProvider.java   
/**
* Updates the package icon
* @param element the element to update
* @param runnables the resulting view changes as runnables (type {@link Runnable})
*/
private void postUpdateIcon(final IJavaElement element, Collection<Runnable> runnables) {
 runnables.add(new Runnable() {
    public void run() {
        // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
        fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaBrowsingContentProvider.java   
/**
* Updates the package icon
*/
private void postUpdateIcon(final IJavaElement element) {
    postRunnable(new Runnable() {
    public void run() {
        Control ctrl= fViewer.getControl();
        if (ctrl != null && !ctrl.isDisposed())
            fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
    }
});
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaElementProperties.java   
public Object getPropertyValue(Object name) {
    if (name.equals(IBasicPropertyConstants.P_TEXT)) {
        return fSource.getElementName();
    }
    return null;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaElementProperties.java   
public Object getPropertyValue(Object name) {
    if (name.equals(IBasicPropertyConstants.P_TEXT)) {
        return fSource.getElementName();
    }
    return null;
}
项目:relations    文件:NewWizardCollectionComparator.java   
/**
 * Return true if this sorter is affected by a property change of
 * propertyName on the specified element.
 */
@Override
public boolean isSorterProperty(final Object object,
        final String propertyId) {
    return propertyId.equals(IBasicPropertyConstants.P_TEXT);
}