mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
Bug 181020, Ugly/confusing presentation of (sub) source folders in C/C++ view
This commit is contained in:
parent
c2c10e2ac1
commit
9514e9c398
12 changed files with 158 additions and 12 deletions
|
@ -33,6 +33,7 @@ import org.eclipse.cdt.internal.core.model.CoreModelMessages;
|
|||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
/**
|
||||
* Creates labels for ICElement objects.
|
||||
|
@ -771,7 +772,14 @@ public class CElementBaseLabels {
|
|||
if (rootQualified) {
|
||||
buf.append(container.getPath().makeRelative().toString());
|
||||
} else {
|
||||
if (CCorePlugin.showSourceRootsAtTopOfProject()) {
|
||||
buf.append(container.getElementName());
|
||||
}
|
||||
else {
|
||||
String elementName = container.getElementName();
|
||||
IPath path = new Path(elementName);
|
||||
buf.append(path.lastSegment());
|
||||
}
|
||||
if (getFlag(flags, ROOT_QUALIFIED)) {
|
||||
if (resource != null && container instanceof ISourceRoot && isReferenced((ISourceRoot)container)) {
|
||||
buf.append(CONCAT_STRING);
|
||||
|
|
|
@ -457,10 +457,10 @@ final class DeltaProcessor {
|
|||
ICElement current = createElement(resource);
|
||||
updateChildren = updateCurrentDeltaAndIndex(current, delta);
|
||||
if (current == null) {
|
||||
if (parent != null)
|
||||
nonCResourcesChanged(parent, delta);
|
||||
// no corresponding ICElement - we are done
|
||||
return;
|
||||
} else if (current instanceof ISourceRoot) {
|
||||
if (parent != null)
|
||||
nonCResourcesChanged(parent, delta);
|
||||
} else if (current instanceof ICProject) {
|
||||
ICProject cprj = (ICProject)current;
|
||||
|
|
|
@ -1269,4 +1269,14 @@ public class CCorePlugin extends Plugin {
|
|||
public static IPDOMManager getPDOMManager() {
|
||||
return getDefault().pdomManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns preference controlling whether source roots are shown at the top of projects
|
||||
* or embedded within the resource tree of projects when they are not top level folders.
|
||||
*
|
||||
* @return boolean preference value
|
||||
*/
|
||||
public static boolean showSourceRootsAtTopOfProject() {
|
||||
return getDefault().getPluginPreferences().getBoolean( CCorePreferenceConstants.SHOW_SOURCE_ROOTS_AT_TOP_LEVEL_OF_PROJECT);
|
||||
}
|
||||
}
|
|
@ -142,4 +142,9 @@ public class CCorePreferenceConstants {
|
|||
* Attempt to show source files for executable binaries.
|
||||
*/
|
||||
public static final String SHOW_SOURCE_FILES_IN_BINARIES = CCorePlugin.PLUGIN_ID + ".showSourceFilesInBinaries"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Show source roots at the top level of projects.
|
||||
*/
|
||||
public static final String SHOW_SOURCE_ROOTS_AT_TOP_LEVEL_OF_PROJECT = CCorePlugin.PLUGIN_ID + ".showSourceRootsAtTopLevelOfProject"; //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
|||
defaultPreferences.putBoolean(CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES, true);
|
||||
defaultPreferences.putBoolean(CCorePlugin.PREF_USE_STRUCTURAL_PARSE_MODE, false);
|
||||
defaultPreferences.putBoolean(CCorePreferenceConstants.FILE_PATH_CANONICALIZATION, true);
|
||||
defaultPreferences.putBoolean(CCorePreferenceConstants.SHOW_SOURCE_ROOTS_AT_TOP_LEVEL_OF_PROJECT, true);
|
||||
|
||||
// indexer defaults
|
||||
IndexerPreferences.initializeDefaultPreferences(defaultPreferences);
|
||||
|
|
BIN
core/org.eclipse.cdt.ui/icons/obj16/sroot2_obj.gif
Normal file
BIN
core/org.eclipse.cdt.ui/icons/obj16/sroot2_obj.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 231 B |
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.cdt.internal.ui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -26,6 +27,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
|
|||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.ui.model.IWorkbenchAdapter;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.IArchive;
|
||||
|
@ -333,6 +335,10 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
}
|
||||
Object parent = null;
|
||||
if (element instanceof ICElement) {
|
||||
if (element instanceof ICContainer && !CCorePlugin.showSourceRootsAtTopOfProject()) {
|
||||
parent = ((ICContainer) element).getResource().getParent();
|
||||
}
|
||||
else
|
||||
parent = ((ICElement)element).getParent();
|
||||
// translate working copy parent to original TU,
|
||||
// because working copies are never returned by getChildren
|
||||
|
@ -415,8 +421,12 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
ICElement[] c2 = ((ISourceRoot)child).getChildren();
|
||||
for (int k = 0; k < c2.length; ++k)
|
||||
list.add(c2[k]);
|
||||
} else
|
||||
} else if (CCorePlugin.showSourceRootsAtTopOfProject()) {
|
||||
list.add(child);
|
||||
} else if (child instanceof ISourceRoot &&
|
||||
child.getResource().getParent().equals(cproject.getProject())) {
|
||||
list.add(child);
|
||||
}
|
||||
}
|
||||
|
||||
Object[] objects = list.toArray();
|
||||
|
@ -554,7 +564,11 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
|
||||
protected Object[] getCResources(ICContainer container) throws CModelException {
|
||||
Object[] objects = null;
|
||||
Object[] children = container.getChildren();
|
||||
ICElement[] children = container.getChildren();
|
||||
List<ICElement> missingElements = Collections.emptyList();
|
||||
if (!CCorePlugin.showSourceRootsAtTopOfProject()) {
|
||||
missingElements = getMissingElements(container, children);
|
||||
}
|
||||
try {
|
||||
objects = container.getNonCResources();
|
||||
if (objects.length > 0) {
|
||||
|
@ -562,10 +576,47 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
}
|
||||
} catch (CModelException e) {
|
||||
}
|
||||
if (objects == null || objects.length == 0) {
|
||||
return children;
|
||||
|
||||
Object[] result = children;
|
||||
if (missingElements.size() > 0) {
|
||||
result = concatenate(result, missingElements.toArray());
|
||||
}
|
||||
return concatenate(children, objects);
|
||||
|
||||
if (objects != null && objects.length > 0) {
|
||||
result = concatenate(result, objects);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<ICElement> getMissingElements(ICContainer container, ICElement[] elements) {
|
||||
// nested source roots may be filtered out below the project root,
|
||||
// we need to find them to add them back in
|
||||
List<ICElement> missingElements = new ArrayList<ICElement>();
|
||||
try {
|
||||
List<IResource> missingContainers = new ArrayList<IResource>();
|
||||
IResource[] allChildren = ((IContainer) container.getResource()).members();
|
||||
for (IResource child : allChildren) {
|
||||
if (!(child instanceof IContainer))
|
||||
continue;
|
||||
boolean found = false;
|
||||
for (ICElement element : elements) {
|
||||
if (element.getResource().equals(child)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
missingContainers.add(child);
|
||||
}
|
||||
for (IResource resource : missingContainers) {
|
||||
ICElement element = container.getCProject().findElement(resource.getFullPath());
|
||||
if (element != null)
|
||||
missingElements.add(element);
|
||||
}
|
||||
} catch (CoreException e1) {
|
||||
}
|
||||
return missingElements;
|
||||
}
|
||||
|
||||
protected Object[] getResources(IProject project) {
|
||||
|
@ -617,16 +668,19 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
|||
// folder we have to exclude it as a normal child.
|
||||
if (o instanceof IFolder) {
|
||||
IFolder folder = (IFolder)o;
|
||||
boolean found = false;
|
||||
for (ISourceRoot root : roots) {
|
||||
if (root.getPath().equals(folder.getFullPath())) {
|
||||
found = true;
|
||||
ISourceRoot root = null;
|
||||
for (int j = 0; j < roots.length; j++) {
|
||||
if (roots[j].getPath().equals(folder.getFullPath())) {
|
||||
root = roots[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// it is a sourceRoot skip it.
|
||||
if (found) {
|
||||
if (root != null) {
|
||||
if (CCorePlugin.showSourceRootsAtTopOfProject())
|
||||
continue;
|
||||
else
|
||||
o = root;
|
||||
}
|
||||
} else if (o instanceof IFile){
|
||||
boolean found = false;
|
||||
|
|
|
@ -98,6 +98,7 @@ public class CPluginImages {
|
|||
public static final String IMG_OBJS_TUNIT_RESOURCE_H= NAME_PREFIX + "ch_resource_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_TUNIT_RESOURCE_A= NAME_PREFIX + "asm_resource_obj.gif"; //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_SOURCE_ROOT= NAME_PREFIX + "sroot_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_SOURCE2_ROOT= NAME_PREFIX + "sroot2_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_FOLDER= NAME_PREFIX + "fldr_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_CFOLDER= NAME_PREFIX + "cfolder_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
public static final String IMG_OBJS_CONFIG = NAME_PREFIX + "config.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||
|
@ -184,6 +185,7 @@ public class CPluginImages {
|
|||
public static final ImageDescriptor DESC_OBJS_TUNIT_RESOURCE_H= createManaged(T_OBJ, IMG_OBJS_TUNIT_RESOURCE_H);
|
||||
public static final ImageDescriptor DESC_OBJS_TUNIT_RESOURCE_A= createManaged(T_OBJ, IMG_OBJS_TUNIT_RESOURCE_A);
|
||||
public static final ImageDescriptor DESC_OBJS_SOURCE_ROOT= createManaged(T_OBJ, IMG_OBJS_SOURCE_ROOT);
|
||||
public static final ImageDescriptor DESC_OBJS_SOURCE2_ROOT= createManaged(T_OBJ, IMG_OBJS_SOURCE2_ROOT);
|
||||
public static final ImageDescriptor DESC_OBJS_FOLDER= createManaged(T_OBJ, IMG_OBJS_FOLDER);
|
||||
public static final ImageDescriptor DESC_OBJS_CFOLDER= createManaged(T_OBJ, IMG_OBJS_CFOLDER);
|
||||
public static final ImageDescriptor DESC_OBJS_CONFIG = createManaged(T_OBJ, IMG_OBJS_CONFIG);
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
package org.eclipse.cdt.internal.ui.preferences;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
|
@ -28,6 +30,8 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
|
|||
import org.eclipse.ui.PlatformUI;
|
||||
import org.osgi.service.prefs.BackingStoreException;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||
|
||||
|
@ -49,6 +53,8 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
private SelectionButtonDialogField fCViewGroupMacros;
|
||||
private SelectionButtonDialogField fOutlineGroupMembers;
|
||||
private SelectionButtonDialogField fOutlineGroupMacros;
|
||||
private SelectionButtonDialogField fShowSourceRootsAtTopOfProject;
|
||||
|
||||
|
||||
public AppearancePreferencePage() {
|
||||
setPreferenceStore(PreferenceConstants.getPreferenceStore());
|
||||
|
@ -83,6 +89,10 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
fCViewSeparateHeaderAndSource= new SelectionButtonDialogField(SWT.CHECK);
|
||||
fCViewSeparateHeaderAndSource.setDialogFieldListener(listener);
|
||||
fCViewSeparateHeaderAndSource.setLabelText(PreferencesMessages.AppearancePreferencePage_cviewSeparateHeaderAndSource_label);
|
||||
|
||||
fShowSourceRootsAtTopOfProject= new SelectionButtonDialogField(SWT.CHECK);
|
||||
fShowSourceRootsAtTopOfProject.setDialogFieldListener(listener);
|
||||
fShowSourceRootsAtTopOfProject.setLabelText(PreferencesMessages.AppearancePreferencePage_showSourceRootsAtTopOfProject_label);
|
||||
|
||||
fOutlineGroupMacros= new SelectionButtonDialogField(SWT.CHECK);
|
||||
fOutlineGroupMacros.setDialogFieldListener(listener);
|
||||
|
@ -103,6 +113,8 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
fOutlineGroupNamespaces.setSelection(prefs.getBoolean(PreferenceConstants.OUTLINE_GROUP_NAMESPACES));
|
||||
fOutlineGroupMembers.setSelection(prefs.getBoolean(PreferenceConstants.OUTLINE_GROUP_MEMBERS));
|
||||
fOutlineGroupMacros.setSelection(prefs.getBoolean(PreferenceConstants.OUTLINE_GROUP_MACROS));
|
||||
boolean showSourceRootsAtTopOfProject = CCorePlugin.showSourceRootsAtTopOfProject();
|
||||
fShowSourceRootsAtTopOfProject.setSelection(showSourceRootsAtTopOfProject);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -148,6 +160,10 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
gd.horizontalSpan= 2;
|
||||
noteControl.setLayoutData(gd);
|
||||
|
||||
|
||||
new Separator().doFillIntoGrid(result, nColumns);
|
||||
fShowSourceRootsAtTopOfProject.doFillIntoGrid(result, nColumns);
|
||||
|
||||
initFields();
|
||||
|
||||
Dialog.applyDialogFont(result);
|
||||
|
@ -189,6 +205,11 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
prefs.setValue(PreferenceConstants.OUTLINE_GROUP_MACROS, fOutlineGroupMacros.isSelected());
|
||||
try {
|
||||
new InstanceScope().getNode(CUIPlugin.PLUGIN_ID).flush();
|
||||
IEclipsePreferences corePluginNode = new InstanceScope().getNode(CCorePlugin.PLUGIN_ID);
|
||||
corePluginNode.putBoolean(
|
||||
CCorePreferenceConstants.SHOW_SOURCE_ROOTS_AT_TOP_LEVEL_OF_PROJECT,
|
||||
fShowSourceRootsAtTopOfProject.isSelected());
|
||||
corePluginNode.flush();
|
||||
} catch (BackingStoreException exc) {
|
||||
CUIPlugin.log(exc);
|
||||
}
|
||||
|
@ -209,6 +230,8 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
|
|||
fOutlineGroupNamespaces.setSelection(prefs.getDefaultBoolean(PreferenceConstants.OUTLINE_GROUP_NAMESPACES));
|
||||
fOutlineGroupMembers.setSelection(prefs.getDefaultBoolean(PreferenceConstants.OUTLINE_GROUP_MEMBERS));
|
||||
fOutlineGroupMacros.setSelection(prefs.getDefaultBoolean(PreferenceConstants.OUTLINE_GROUP_MACROS));
|
||||
boolean showSourceRootsPref = new DefaultScope().getNode(CCorePlugin.PLUGIN_ID).getBoolean(CCorePreferenceConstants.SHOW_SOURCE_ROOTS_AT_TOP_LEVEL_OF_PROJECT, true);
|
||||
fShowSourceRootsAtTopOfProject.setSelection(showSourceRootsPref);
|
||||
super.performDefaults();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ public final class PreferencesMessages extends NLS {
|
|||
public static String AppearancePreferencePage_outlineGroupMacros_label;
|
||||
public static String AppearancePreferencePage_note;
|
||||
public static String AppearancePreferencePage_preferenceOnlyForNewViews;
|
||||
public static String AppearancePreferencePage_showSourceRootsAtTopOfProject_label;
|
||||
public static String CEditorPreferencePage_folding_title;
|
||||
public static String FoldingConfigurationBlock_enable;
|
||||
public static String FoldingConfigurationBlock_combo_caption;
|
||||
|
|
|
@ -159,6 +159,7 @@ AppearancePreferencePage_outlineGroupNamespaces_label= Group namespaces in the O
|
|||
AppearancePreferencePage_note=Note:
|
||||
AppearancePreferencePage_preferenceOnlyForNewViews=This preference does not affect open views
|
||||
AppearancePreferencePage_outlineGroupMacros_label=Group macro definitions in the Outline view
|
||||
AppearancePreferencePage_showSourceRootsAtTopOfProject_label=Show source roots at top of project
|
||||
|
||||
#Folding
|
||||
CEditorPreferencePage_folding_title= &Folding
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
package org.eclipse.cdt.internal.ui.viewsupport;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
|
@ -23,12 +25,14 @@ import org.eclipse.ui.ISharedImages;
|
|||
import org.eclipse.ui.ide.IDE;
|
||||
import org.eclipse.ui.model.IWorkbenchAdapter;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.IArchiveContainer;
|
||||
import org.eclipse.cdt.core.model.IBinary;
|
||||
import org.eclipse.cdt.core.model.IBinaryContainer;
|
||||
import org.eclipse.cdt.core.model.IBinaryModule;
|
||||
import org.eclipse.cdt.core.model.ICContainer;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.IContributedCElement;
|
||||
|
@ -46,6 +50,8 @@ import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
|||
import org.eclipse.cdt.ui.CElementImageDescriptor;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
import org.eclipse.cdt.internal.core.model.CModelManager;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||
|
||||
|
||||
|
@ -120,6 +126,10 @@ public class CElementImageProvider {
|
|||
public Image getImageLabel(Object element, int flags) {
|
||||
ImageDescriptor descriptor= null;
|
||||
if (element instanceof ICElement) {
|
||||
if (!CCorePlugin.showSourceRootsAtTopOfProject() &&
|
||||
element instanceof ICContainer && isParentOfSourceRoot(element))
|
||||
descriptor = CPluginImages.DESC_OBJS_SOURCE2_ROOT;
|
||||
else
|
||||
descriptor= getCImageDescriptor((ICElement) element, flags);
|
||||
} else if (element instanceof IFile) {
|
||||
// Check for Non Translation Unit.
|
||||
|
@ -138,6 +148,9 @@ public class CElementImageProvider {
|
|||
Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;
|
||||
descriptor = new CElementImageDescriptor(descriptor, 0, size);
|
||||
}
|
||||
} else if (!CCorePlugin.showSourceRootsAtTopOfProject() &&
|
||||
element instanceof IFolder && isParentOfSourceRoot(element)) {
|
||||
descriptor = CPluginImages.DESC_OBJS_SOURCE2_ROOT;
|
||||
}
|
||||
if (descriptor == null && element instanceof IAdaptable) {
|
||||
descriptor= getWorkbenchImageDescriptor((IAdaptable) element, flags);
|
||||
|
@ -148,6 +161,34 @@ public class CElementImageProvider {
|
|||
return null;
|
||||
}
|
||||
|
||||
private boolean isParentOfSourceRoot(Object element) {
|
||||
// we want to return true for parents of source roots which are not themselves source roots
|
||||
// so we can distinguish the two and return the source root icon or the parent of source root icon
|
||||
IFolder folder = null;
|
||||
if (element instanceof ICContainer && !(element instanceof ISourceRoot))
|
||||
folder = (IFolder) ((ICContainer) element).getResource();
|
||||
else if (element instanceof IFolder)
|
||||
folder = (IFolder) element;
|
||||
if (folder == null)
|
||||
return false;
|
||||
|
||||
ICProject cproject = CModelManager.getDefault().getCModel().findCProject(folder.getProject());
|
||||
if (cproject != null) {
|
||||
try {
|
||||
IPath folderPath = folder.getFullPath();
|
||||
for (ICElement sourceRoot : cproject.getSourceRoots()) {
|
||||
IPath sourceRootPath = sourceRoot.getPath();
|
||||
if (folderPath.isPrefixOf(sourceRootPath)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (CModelException e) {
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ImageDescriptor getImageDescriptor(int type) {
|
||||
switch (type) {
|
||||
case ICElement.C_VCONTAINER:
|
||||
|
|
Loading…
Add table
Reference in a new issue