Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2015-02-18 22:00:44 +0000
committerDani Megert2015-02-19 12:42:56 +0000
commit23748ba665160ecbd52d90faabb18d881a836ed7 (patch)
tree335bb6e2f9a4785b9a7672a43c2dbcf808b1ae16
parent5d89a8dcfdc41e8aaf58b1026519d595762cadfc (diff)
downloadeclipse.platform.ui-23748ba665160ecbd52d90faabb18d881a836ed7.tar.gz
eclipse.platform.ui-23748ba665160ecbd52d90faabb18d881a836ed7.tar.xz
eclipse.platform.ui-23748ba665160ecbd52d90faabb18d881a836ed7.zip
Bug 444840 - [IDE] IDE.getEditorId(IFileStore) is private
Change-Id: I8d0f6d877ae74a4aaa629d119905e1eee9dac8be Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.ui.ide/pom.xml4
-rw-r--r--bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java15
3 files changed, 11 insertions, 10 deletions
diff --git a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
index 01803e1f079..a7786c63f1c 100644
--- a/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.ide/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
-Bundle-Version: 3.10.100.qualifier
+Bundle-Version: 3.11.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.ui.ide/pom.xml b/bundles/org.eclipse.ui.ide/pom.xml
index 8b334b04173..5c5afb48dc4 100644
--- a/bundles/org.eclipse.ui.ide/pom.xml
+++ b/bundles/org.eclipse.ui.ide/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2014 Eclipse Foundation and others.
+ Copyright (c) 2012, 2015 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.ide</artifactId>
- <version>3.10.100-SNAPSHOT</version>
+ <version>3.11.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
index 8938a1a916e..89a04f06020 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -721,7 +721,7 @@ public final class IDE {
}
/**
- * Returns an editor id appropriate for opening the given file
+ * Returns an editor descriptor appropriate for opening the given file
* store.
* <p>
* The editor descriptor is determined using a multi-step process. This
@@ -742,13 +742,14 @@ public final class IDE {
* </ol>
* </p>
*
- * @param fileStore
+ * @param fileStore
* the file store
- * @return the id of an editor, appropriate for opening the file
+ * @return the editor descriptor, appropriate for opening the file
* @throws PartInitException
* if no editor can be found
+ * @since 3.11
*/
- private static String getEditorId(IFileStore fileStore) throws PartInitException {
+ public static IEditorDescriptor getEditorDescriptorForFileStore(IFileStore fileStore) throws PartInitException {
String name = fileStore.fetchInfo().getName();
if (name == null) {
throw new IllegalArgumentException();
@@ -775,7 +776,7 @@ public final class IDE {
IEditorDescriptor defaultEditor = editorReg.getDefaultEditor(name, contentType);
defaultEditor = overrideDefaultEditorAssociation(new FileStoreEditorInput(fileStore), contentType, defaultEditor);
- return getEditorDescriptor(name, editorReg, defaultEditor).getId();
+ return getEditorDescriptor(name, editorReg, defaultEditor);
}
/**
@@ -1133,7 +1134,7 @@ public final class IDE {
}
IEditorInput input = getEditorInput(fileStore);
- String editorId = getEditorId(fileStore);
+ String editorId = getEditorDescriptorForFileStore(fileStore).getId();
// open the editor on the file
return page.openEditor(input, editorId);

Back to the top