Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-06-26 11:16:07 -0400
committercletavernie2012-06-26 11:16:07 -0400
commitc738f34f3a368c2e0a1ea6370fb4735d998edf10 (patch)
tree8ac8d7417a0f86850ea147876b52e4860383ee24 /plugins/infra
parentb63402ea615e0a62ed91580e497f951537a5e8ac (diff)
downloadorg.eclipse.papyrus-c738f34f3a368c2e0a1ea6370fb4735d998edf10.tar.gz
org.eclipse.papyrus-c738f34f3a368c2e0a1ea6370fb4735d998edf10.tar.xz
org.eclipse.papyrus-c738f34f3a368c2e0a1ea6370fb4735d998edf10.zip
357296: Papyrus appears to break ecoretools project explorer integration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=357296
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/utils/OneFileUtils.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/utils/OneFileUtils.java b/plugins/infra/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/utils/OneFileUtils.java
index 5362eab6a69..614f0e3f34c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/utils/OneFileUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.onefile/src/org/eclipse/papyrus/infra/onefile/utils/OneFileUtils.java
@@ -15,7 +15,6 @@ import java.util.ArrayList;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
@@ -25,7 +24,6 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
import org.eclipse.papyrus.infra.onefile.Activator;
import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
-import org.eclipse.papyrus.infra.onefile.model.ISubResourceFile;
import org.eclipse.papyrus.infra.onefile.model.PapyrusModelHelper;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
@@ -109,12 +107,11 @@ public class OneFileUtils {
* @return
*/
public static boolean isVisible(Object element) {
- boolean typeOk = element instanceof IPapyrusFile || element instanceof IProject || element instanceof IFile || element instanceof IContainer || element instanceof ISubResourceFile;
- if(typeOk && element instanceof IFile) {
+ if(element instanceof IFile) {
IFile file = (IFile)element;
- typeOk &= !OneFileUtils.diExists(file.getName(), file.getParent());
+ return !OneFileUtils.diExists(file.getName(), file.getParent());
}
- return typeOk;
+ return true; //Don't filter unknown types
}
/**
@@ -204,7 +201,7 @@ public class OneFileUtils {
IEditorPart editor = ref.getEditor(false);
if(editor != null) {
IEditorInput editorInput;
- editorInput = (IEditorInput)editor.getEditorInput();
+ editorInput = editor.getEditorInput();
if(cu.getMainFile().equals(editorInput.getAdapter(IFile.class))) {
if(activate && page.getActivePart() != editor) {
page.activate(editor);
@@ -269,9 +266,9 @@ public class OneFileUtils {
IEditorDescriptor editorDescriptor;
- if(input instanceof IFileEditorInput)
+ if(input instanceof IFileEditorInput) {
editorDescriptor = IDE.getEditorDescriptor(((IFileEditorInput)input).getFile());
- else {
+ } else {
editorDescriptor = IDE.getEditorDescriptor(input.getName());
}
return editorDescriptor.getId();

Back to the top