Search in sources :

Example 71 with ProjectScope

use of org.eclipse.core.resources.ProjectScope in project webtools.sourceediting by eclipse.

the class NewCSSWizard method applyLineDelimiter.

private String applyLineDelimiter(IFile file, String text) {
    // $NON-NLS-1$
    String lineDelimiter = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty("line.separator"), new IScopeContext[] { new ProjectScope(file.getProject()), new InstanceScope() });
    String convertedText = StringUtils.replace(text, "\r\n", "\n");
    convertedText = StringUtils.replace(convertedText, "\r", "\n");
    convertedText = StringUtils.replace(convertedText, "\n", lineDelimiter);
    return convertedText;
}
Also used : ProjectScope(org.eclipse.core.resources.ProjectScope) InstanceScope(org.eclipse.core.runtime.preferences.InstanceScope)

Example 72 with ProjectScope

use of org.eclipse.core.resources.ProjectScope in project webtools.sourceediting by eclipse.

the class MessageFactory method init.

private void init() {
    fPreferenceService = Platform.getPreferencesService();
    fLookupOrder = new IScopeContext[] { new InstanceScope(), new DefaultScope() };
    if (fProject != null) {
        ProjectScope projectScope = new ProjectScope(fProject);
        if (projectScope.getNode(HTMLCorePlugin.getDefault().getBundle().getSymbolicName()).getBoolean(HTMLCorePreferenceNames.USE_PROJECT_SETTINGS, false))
            fLookupOrder = new IScopeContext[] { projectScope, new InstanceScope(), new DefaultScope() };
    }
    for (int i = 0; i < NodeType.MAX_TYPE; i++) {
        errTables[i] = new ErrorTable();
    }
    // NOTE: The severities are just stub.  They must be reviewed.
    // -- 8/30/2001
    // attribute error map
    // short hand
    ErrorTable attrTable = errTables[NodeType.ATTRIBUTE];
    attrTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_UNDEFINED_NAME, attrTable, UNDEFINED_NAME_ERROR, MSG_UNDEFINED_ATTR_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_UNDEFINED_VALUE, attrTable, UNDEFINED_VALUE_ERROR, MSG_UNDEFINED_VALUE_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_NAME_MISMATCH, attrTable, MISMATCHED_ERROR, MSG_MISMATCHED_ATTR_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_INVALID_NAME, attrTable, INVALID_NAME_ERROR, MSG_INVALID_ATTR_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_INVALID_VALUE, attrTable, INVALID_ATTR_ERROR, MSG_ATTR_NO_VALUE_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_DUPLICATE, attrTable, DUPLICATE_ERROR, MSG_DUPLICATE_ATTR_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_VALUE_MISMATCH, attrTable, MISMATCHED_VALUE_ERROR, MSG_MISMATCHED_ATTR_VALUE_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_VALUE_UNCLOSED, attrTable, UNCLOSED_ATTR_VALUE, MSG_UNCLOSED_ATTR_VALUE_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_VALUE_RESOURCE_NOT_FOUND, attrTable, RESOURCE_NOT_FOUND, MSG_RESOURCE_NOT_FOUND);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_OBSOLETE_NAME, attrTable, OBSOLETE_ATTR_NAME_ERROR, MSG_OBSOLETE_ATTR_ERROR);
    mapToKey(HTMLCorePreferenceNames.ATTRIBUTE_VALUE_EQUALS_MISSING, attrTable, MISSING_ATTR_VALUE_EQUALS_ERROR, MSG_MISSING_ATTR_VALUE_EQUALS_ERROR);
    // element error map
    // short hand
    ErrorTable elemTable = errTables[NodeType.ELEMENT];
    elemTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.ELEM_UNKNOWN_NAME, elemTable, UNDEFINED_NAME_ERROR, MSG_UNDEFINED_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_INVALID_NAME, elemTable, INVALID_NAME_ERROR, MSG_INVALID_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_START_INVALID_CASE, elemTable, MISMATCHED_ERROR, MSG_MISMATCHED_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_END_INVALID_CASE, elemTable, MISMATCHED_END_TAG_ERROR, MSG_MISMATCHED_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_MISSING_START, elemTable, MISSING_START_TAG_ERROR, MSG_MISSING_START_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_MISSING_END, elemTable, MISSING_END_TAG_ERROR, MSG_MISSING_END_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_UNNECESSARY_END, elemTable, UNNECESSARY_END_TAG_ERROR, MSG_UNNECESSARY_END_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_INVALID_DIRECTIVE, elemTable, INVALID_DIRECTIVE_ERROR, MSG_INVALID_DIRECTIVE_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_INVALID_CONTENT, elemTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_DUPLICATE, elemTable, DUPLICATE_ERROR, MSG_DUPLICATE_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_COEXISTENCE, elemTable, COEXISTENCE_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_UNCLOSED_START_TAG, elemTable, UNCLOSED_TAG_ERROR, MSG_UNCLOSED_START_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_UNCLOSED_END_TAG, elemTable, UNCLOSED_END_TAG_ERROR, MSG_UNCLOSED_END_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_INVALID_EMPTY_TAG, elemTable, INVALID_EMPTY_ELEMENT_TAG, MSG_INVALID_EMPTY_ELEMENT_TAG);
    mapToKey(HTMLCorePreferenceNames.ELEM_OBSOLETE_NAME, elemTable, OBSOLETE_TAG_NAME_ERROR, MSG_OBSOLETE_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.ELEM_INVALID_TEXT, elemTable, INVALID_TEXT_IN_ELEM_ERROR, MSG_INVALID_TEXT_IN_ELEM_ERROR);
    // document type error map
    // short hand
    ErrorTable docTable = errTables[NodeType.DOCUMENT_TYPE];
    docTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.DOC_DUPLICATE, docTable, DUPLICATE_ERROR, MSG_DUPLICATE_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.DOC_INVALID_CONTENT, docTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.DOC_DOCTYPE_UNCLOSED, docTable, UNCLOSED_TAG_ERROR, MSG_UNCLOSED_DOCTYPE_ERROR);
    // text error map
    ErrorTable textTable = errTables[NodeType.TEXT];
    textTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.TEXT_INVALID_CONTENT, textTable, INVALID_CONTENT_ERROR, MSG_INVALID_TEXT_ERROR);
    mapToKey(HTMLCorePreferenceNames.TEXT_INVALID_CHAR, textTable, INVALID_CHAR_ERROR, MSG_INVALID_CHAR_ERROR);
    // comment error map
    ErrorTable commTable = errTables[NodeType.COMMENT];
    commTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.COMMENT_INVALID_CONTENT, commTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.COMMENT_UNCLOSED, commTable, UNCLOSED_TAG_ERROR, MSG_UNCLOSED_COMMENT_ERROR);
    // cdata section error map
    ErrorTable cdatTable = errTables[NodeType.CDATA_SECTION];
    cdatTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.CDATA_INVALID_CONTENT, cdatTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.CDATA_UNCLOSED, cdatTable, UNCLOSED_TAG_ERROR, MSG_UNCLOSED_CDATA_SECTION_ERROR);
    // processing instruction error map
    ErrorTable piTable = errTables[NodeType.PROCESSING_INSTRUCTION];
    piTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.PI_INVALID_CONTENT, piTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
    mapToKey(HTMLCorePreferenceNames.PI_UNCLOSED, piTable, UNCLOSED_TAG_ERROR, MSG_UNCLOSED_PI_ERROR);
    // entity reference error map
    ErrorTable erTable = errTables[NodeType.ENTITY_REFERENCE];
    erTable.put(NONE_ERROR, MSG_NO_ERROR, 0);
    mapToKey(HTMLCorePreferenceNames.REF_UNDEFINED, erTable, UNDEFINED_NAME_ERROR, MSG_UNDEFINED_TAG_ERROR);
    mapToKey(HTMLCorePreferenceNames.REF_INVALID_CONTENT, erTable, INVALID_CONTENT_ERROR, MSG_INVALID_CONTENT_ERROR);
}
Also used : ProjectScope(org.eclipse.core.resources.ProjectScope) IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) InstanceScope(org.eclipse.core.runtime.preferences.InstanceScope) DefaultScope(org.eclipse.core.runtime.preferences.DefaultScope)

Example 73 with ProjectScope

use of org.eclipse.core.resources.ProjectScope in project webtools.sourceediting by eclipse.

the class IgnoreAttributeNameCompletionProposal method apply.

/*
	 * @see ICompletionProposal#apply(IDocument)
	 */
public void apply(IDocument document) {
    Object adapter = (fTarget instanceof IAdaptable ? ((IAdaptable) fTarget).getAdapter(IResource.class) : null);
    IProject project = (adapter instanceof IResource ? ((IResource) adapter).getProject() : null);
    IScopeContext[] fLookupOrder = new IScopeContext[] { new InstanceScope(), new DefaultScope() };
    boolean hasProjectSettings = false;
    if (project != null) {
        ProjectScope projectScope = new ProjectScope(project);
        if (projectScope.getNode(getPreferenceNodeQualifier()).getBoolean(getProjectSettingsKey(), false)) {
            hasProjectSettings = true;
            fLookupOrder = new IScopeContext[] { projectScope, new InstanceScope(), new DefaultScope() };
        }
    }
    boolean originalEnableIgnore = fPreferenceService.getBoolean(getPreferenceNodeQualifier(), HTMLCorePreferenceNames.IGNORE_ATTRIBUTE_NAMES, HTMLCorePreferenceNames.IGNORE_ATTRIBUTE_NAMES_DEFAULT, fLookupOrder);
    String originalAttributeNames = fPreferenceService.getString(getPreferenceNodeQualifier(), HTMLCorePreferenceNames.ATTRIBUTE_NAMES_TO_IGNORE, HTMLCorePreferenceNames.ATTRIBUTE_NAMES_TO_IGNORE_DEFAULT, fLookupOrder);
    StringBuffer ignoreList = new StringBuffer(originalAttributeNames);
    if (!containsPattern(originalAttributeNames, fPattern)) {
        if (ignoreList.length() > 0)
            ignoreList.append(',');
        ignoreList.append(fPattern.toLowerCase());
    }
    fLookupOrder[0].getNode(getPreferenceNodeQualifier()).putBoolean(HTMLCorePreferenceNames.IGNORE_ATTRIBUTE_NAMES, true);
    fLookupOrder[0].getNode(getPreferenceNodeQualifier()).put(HTMLCorePreferenceNames.ATTRIBUTE_NAMES_TO_IGNORE, ignoreList.toString());
    PreferenceDialog dialog = hasProjectSettings ? PreferencesUtil.createPropertyDialogOn(getShell(), project, HTMLValidationPreferencePage.PROPERTY_PAGE_ID, null, null) : PreferencesUtil.createPreferenceDialogOn(getShell(), HTMLValidationPreferencePage.PREFERENCE_PAGE_ID, null, null);
    int result = Window.CANCEL;
    if (dialog != null) {
        Object page = dialog.getSelectedPage();
        if (page instanceof HTMLValidationPreferencePage) {
            ((HTMLValidationPreferencePage) page).overrideIgnoredAttributesOriginValues(originalEnableIgnore, originalAttributeNames);
        }
        result = dialog.open();
    }
    if (Window.CANCEL == result) {
        fLookupOrder[0].getNode(getPreferenceNodeQualifier()).putBoolean(HTMLCorePreferenceNames.IGNORE_ATTRIBUTE_NAMES, originalEnableIgnore);
        fLookupOrder[0].getNode(getPreferenceNodeQualifier()).put(HTMLCorePreferenceNames.ATTRIBUTE_NAMES_TO_IGNORE, originalAttributeNames);
        for (int i = 0; i < fLookupOrder.length; i++) {
            try {
                fLookupOrder[i].getNode(getPreferenceNodeQualifier()).flush();
            } catch (BackingStoreException e) {
                Logger.logException(e);
            }
        }
    }
}
Also used : ProjectScope(org.eclipse.core.resources.ProjectScope) IAdaptable(org.eclipse.core.runtime.IAdaptable) BackingStoreException(org.osgi.service.prefs.BackingStoreException) DefaultScope(org.eclipse.core.runtime.preferences.DefaultScope) IProject(org.eclipse.core.resources.IProject) Point(org.eclipse.swt.graphics.Point) HTMLValidationPreferencePage(org.eclipse.wst.html.ui.internal.preferences.ui.HTMLValidationPreferencePage) IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) PreferenceDialog(org.eclipse.jface.preference.PreferenceDialog) InstanceScope(org.eclipse.core.runtime.preferences.InstanceScope) IResource(org.eclipse.core.resources.IResource)

Example 74 with ProjectScope

use of org.eclipse.core.resources.ProjectScope in project webtools.sourceediting by eclipse.

the class HTMLSyntaxValidationQuickFixProcessor method computeQuickAssistProposals.

/*
	 * @see org.eclipse.jface.text.quickassist.IQuickAssistProcessor#computeQuickAssistProposals(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext)
	 */
public ICompletionProposal[] computeQuickAssistProposals(IQuickAssistInvocationContext invocationContext) {
    ISourceViewer viewer = invocationContext.getSourceViewer();
    int documentOffset = invocationContext.getOffset();
    int length = viewer != null ? viewer.getSelectedRange().y : 0;
    IAnnotationModel model = viewer.getAnnotationModel();
    if (model == null)
        return null;
    List proposals = new ArrayList();
    if (model instanceof IAnnotationModelExtension2) {
        Iterator iter = ((IAnnotationModelExtension2) model).getAnnotationIterator(documentOffset, length, true, true);
        while (iter.hasNext()) {
            Annotation anno = (Annotation) iter.next();
            if (canFix(anno)) {
                int offset = -1;
                if (anno instanceof TemporaryAnnotation) {
                    offset = ((TemporaryAnnotation) anno).getPosition().getOffset();
                } else if (anno instanceof MarkerAnnotation) {
                    offset = ((MarkerAnnotation) anno).getMarker().getAttribute(IMarker.CHAR_START, -1);
                }
                if (offset == -1)
                    continue;
                IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);
                if (!(node instanceof Element))
                    continue;
                Object adapter = (node instanceof IAdaptable ? ((IAdaptable) node).getAdapter(IResource.class) : null);
                IProject project = (adapter instanceof IResource ? ((IResource) adapter).getProject() : null);
                IScopeContext[] fLookupOrder = new IScopeContext[] { new InstanceScope(), new DefaultScope() };
                if (project != null) {
                    ProjectScope projectScope = new ProjectScope(project);
                    if (projectScope.getNode(getPreferenceNodeQualifier()).getBoolean(getProjectSettingsKey(), false))
                        fLookupOrder = new IScopeContext[] { projectScope, new InstanceScope(), new DefaultScope() };
                }
                boolean ignore = fPreferenceService.getBoolean(getPreferenceNodeQualifier(), HTMLCorePreferenceNames.IGNORE_ELEMENT_NAMES, HTMLCorePreferenceNames.IGNORE_ELEMENT_NAMES_DEFAULT, fLookupOrder);
                String ignoreList = fPreferenceService.getString(getPreferenceNodeQualifier(), HTMLCorePreferenceNames.ELEMENT_NAMES_TO_IGNORE, HTMLCorePreferenceNames.ELEMENT_NAMES_TO_IGNORE_DEFAULT, fLookupOrder);
                Set result = new HashSet();
                if (ignoreList.trim().length() > 0) {
                    // $NON-NLS-1$
                    String[] names = ignoreList.split(",");
                    for (int i = 0; names != null && i < names.length; i++) {
                        String name = names[i] == null ? null : names[i].trim();
                        if (name != null && name.length() > 0)
                            result.add(name.toLowerCase());
                    }
                }
                String name = getElementName(node, offset);
                if (name == null)
                    continue;
                // If ignore == false. then show a quick fix anyway (due to allow to turn 'ignore' option on)
                if (!ignore || shouldShowQuickFix(result, name.toLowerCase())) {
                    IgnoreElementNameCompletionProposal p = new IgnoreElementNameCompletionProposal(name.toLowerCase(), offset, NLS.bind(HTMLUIMessages.DoNotValidateElement, name), HTMLUIMessages.DoNotValidateElementAddInfo, node);
                    if (!proposals.contains(p))
                        proposals.add(p);
                }
                int dashIndex = name.indexOf('-');
                while (dashIndex != -1) {
                    StringBuffer namePattern = new StringBuffer(name.substring(0, dashIndex + 1)).append('*');
                    // a more common pattern is already created
                    if (ignore && result.contains(namePattern.toString().toLowerCase()))
                        break;
                    IgnoreElementNameCompletionProposal p = new IgnoreElementNameCompletionProposal(namePattern.toString().toLowerCase(), offset, NLS.bind(HTMLUIMessages.DoNotValidateAllElements, namePattern.toString()), HTMLUIMessages.DoNotValidateAllElementsAddInfo, node);
                    if (!proposals.contains(p))
                        proposals.add(p);
                    dashIndex = name.indexOf('-', dashIndex + 1);
                }
            }
        }
    }
    if (proposals.isEmpty())
        return null;
    return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
}
Also used : ProjectScope(org.eclipse.core.resources.ProjectScope) IAdaptable(org.eclipse.core.runtime.IAdaptable) HashSet(java.util.HashSet) Set(java.util.Set) Element(org.w3c.dom.Element) ArrayList(java.util.ArrayList) IAnnotationModel(org.eclipse.jface.text.source.IAnnotationModel) IScopeContext(org.eclipse.core.runtime.preferences.IScopeContext) IDOMNode(org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) Iterator(java.util.Iterator) InstanceScope(org.eclipse.core.runtime.preferences.InstanceScope) ArrayList(java.util.ArrayList) List(java.util.List) HashSet(java.util.HashSet) DefaultScope(org.eclipse.core.runtime.preferences.DefaultScope) Annotation(org.eclipse.jface.text.source.Annotation) MarkerAnnotation(org.eclipse.ui.texteditor.MarkerAnnotation) TemporaryAnnotation(org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation) IProject(org.eclipse.core.resources.IProject) IAnnotationModelExtension2(org.eclipse.jface.text.source.IAnnotationModelExtension2) MarkerAnnotation(org.eclipse.ui.texteditor.MarkerAnnotation) ISourceViewer(org.eclipse.jface.text.source.ISourceViewer) TemporaryAnnotation(org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation) IResource(org.eclipse.core.resources.IResource)

Example 75 with ProjectScope

use of org.eclipse.core.resources.ProjectScope in project webtools.sourceediting by eclipse.

the class HTMLContentProperties method getPreferences.

/**
 * Get the preferences node associated with the given project scope and
 * preference key (subNode) If create is true, the preference node will be
 * created if one does not already exist
 *
 * @param project
 *            the project the preference node is under
 * @param preferenceKey
 *            the subnode/category the preference node is located in
 * @param create
 *            if true, a preference node will be created if one does not
 *            already exist
 * @return Preferences associated with the given project scope and
 *         preference key. null if one could not be found and create is
 *         false
 */
static Preferences getPreferences(IProject project, String preferenceKey, boolean create) {
    if (create)
        // create all nodes down to the one we are interested in
        return new ProjectScope(project).getNode(HTMLCORE_ID).node(preferenceKey);
    // be careful looking up for our node so not to create any nodes as
    // side effect
    Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
    try {
        // for now, take the long way
        if (!node.nodeExists(project.getName()))
            return null;
        node = node.node(project.getName());
        if (!node.nodeExists(HTMLCORE_ID))
            return null;
        node = node.node(HTMLCORE_ID);
        if (!node.nodeExists(preferenceKey))
            return null;
        return node.node(preferenceKey);
    } catch (BackingStoreException e) {
        // nodeExists failed
        // $NON-NLS-1$
        Logger.log(Logger.WARNING_DEBUG, "Could not retrieve preference node", e);
    }
    return null;
}
Also used : ProjectScope(org.eclipse.core.resources.ProjectScope) BackingStoreException(org.osgi.service.prefs.BackingStoreException) Preferences(org.osgi.service.prefs.Preferences)

Aggregations

ProjectScope (org.eclipse.core.resources.ProjectScope)92 IScopeContext (org.eclipse.core.runtime.preferences.IScopeContext)42 InstanceScope (org.eclipse.core.runtime.preferences.InstanceScope)31 IProject (org.eclipse.core.resources.IProject)28 IEclipsePreferences (org.eclipse.core.runtime.preferences.IEclipsePreferences)24 Preferences (org.osgi.service.prefs.Preferences)18 DefaultScope (org.eclipse.core.runtime.preferences.DefaultScope)17 BackingStoreException (org.osgi.service.prefs.BackingStoreException)17 ScopedPreferenceStore (org.eclipse.ui.preferences.ScopedPreferenceStore)11 IFile (org.eclipse.core.resources.IFile)9 IResource (org.eclipse.core.resources.IResource)9 CoreException (org.eclipse.core.runtime.CoreException)8 IAdaptable (org.eclipse.core.runtime.IAdaptable)5 IPath (org.eclipse.core.runtime.IPath)5 HashSet (java.util.HashSet)4 Set (java.util.Set)4 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)4 Path (org.eclipse.core.runtime.Path)4 Test (org.junit.Test)4 File (java.io.File)3