Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Erven2018-07-16 17:07:22 -0400
committerHannes Erven2018-07-16 17:07:22 -0400
commit8f090169ea85071c63a1cb507313f33ec2d7dd4e (patch)
tree990306ab78865c8d1f91d9c961707952957f3336
parentdf764d4506f9ddf94f0b29a8852ab3ec0b79ff7f (diff)
downloadorg.eclipse.libra-8f090169ea85071c63a1cb507313f33ec2d7dd4e.tar.gz
org.eclipse.libra-8f090169ea85071c63a1cb507313f33ec2d7dd4e.tar.xz
org.eclipse.libra-8f090169ea85071c63a1cb507313f33ec2d7dd4e.zip
even more API changes in Photonphoton
-rw-r--r--plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkCorePlugin.java38
-rw-r--r--plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceConfiguration.java2
-rw-r--r--plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/TargetDefinitionUtil.java15
-rw-r--r--plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/console/ServerConsoleEditorPage.java23
-rw-r--r--plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java22
-rw-r--r--plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java4
-rw-r--r--plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxFrameworkInstance.java4
-rw-r--r--plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/FelixFrameworkInstance.java6
-rw-r--r--plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java6
-rw-r--r--plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java6
-rw-r--r--plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/FrameworkInstanceLocationEditorSection.java4
-rw-r--r--plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java4
-rw-r--r--plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/editor/WebXMLInputContext.java3
13 files changed, 81 insertions, 56 deletions
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkCorePlugin.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkCorePlugin.java
index 9f0ddd5..d8fdec4 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkCorePlugin.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkCorePlugin.java
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.osgi.service.debug.DebugOptions;
import org.eclipse.pde.core.project.IBundleProjectDescription;
import org.eclipse.pde.core.project.IBundleProjectService;
-import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.core.target.ITargetPlatformService;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -35,6 +35,14 @@ public class FrameworkCorePlugin extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.libra.framework.core"; //$NON-NLS-1$
+ private ServiceReference<IBundleProjectService> bundleProjectServiceRef;
+ private IBundleProjectService bundleProjectService;
+
+ private ServiceReference<ITargetPlatformService> targetPlatformServiceRef;
+ private ITargetPlatformService targetPlatformService;
+
+ private static FrameworkCorePlugin plugin;
+
/**
* The constructor
*/
@@ -79,6 +87,13 @@ public class FrameworkCorePlugin extends AbstractUIPlugin {
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
+ plugin = this;
+
+ this.bundleProjectServiceRef = context.getServiceReference(IBundleProjectService.class);
+ this.bundleProjectService = context.getService(bundleProjectServiceRef);
+
+ this.targetPlatformServiceRef = context.getServiceReference(ITargetPlatformService.class);
+ this.targetPlatformService = context.getService(targetPlatformServiceRef);
}
/*
@@ -87,9 +102,25 @@ public class FrameworkCorePlugin extends AbstractUIPlugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
+ context.ungetService(this.bundleProjectServiceRef);
+ this.bundleProjectService=null;
+ this.bundleProjectServiceRef=null;
+
+ context.ungetService(this.targetPlatformServiceRef);
+ this.targetPlatformService=null;
+ this.targetPlatformServiceRef=null;
+
+ plugin = null;
super.stop(context);
}
+ public static ITargetPlatformService getTargetPlatformService() {
+ if (plugin==null)
+ return null;
+
+ return plugin.targetPlatformService;
+ }
+
public static String getPreference(String id) {
return Platform.getPreferencesService().getString(PLUGIN_ID, id, "", null);
}
@@ -99,10 +130,9 @@ public class FrameworkCorePlugin extends AbstractUIPlugin {
}
public static IBundleProjectService getBundleProjectService() {
- PDECore instance = PDECore.getDefault();
- if (instance == null)
+ if (plugin == null)
return null;
- return (IBundleProjectService) instance.acquireService(IBundleProjectService.class.getName());
+ return plugin.bundleProjectService;
}
public static IBundleProjectDescription getDescription(IProject project) throws CoreException {
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceConfiguration.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceConfiguration.java
index a11b535..e002c2f 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceConfiguration.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/FrameworkInstanceConfiguration.java
@@ -87,7 +87,7 @@ public class FrameworkInstanceConfiguration {
private ITargetDefinition loadTarget() throws CoreException {
targetDefinition = null;
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
ITargetHandle[] targets = service.getTargets(new NullProgressMonitor());
String name = runtimeInstance.getServer().getName();
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/TargetDefinitionUtil.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/TargetDefinitionUtil.java
deleted file mode 100644
index 823a6c1..0000000
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/TargetDefinitionUtil.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.libra.framework.core;
-
-import org.eclipse.pde.core.target.ITargetPlatformService;
-import org.eclipse.pde.internal.core.PDECore;
-
-@SuppressWarnings("restriction")
-public class TargetDefinitionUtil {
-
- public static ITargetPlatformService getTargetPlatformService() {
- ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
- return service;
- }
-
-
-}
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/console/ServerConsoleEditorPage.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/console/ServerConsoleEditorPage.java
index 7b07a20..ab927e2 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/console/ServerConsoleEditorPage.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/console/ServerConsoleEditorPage.java
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.libra.framework.editor.core.IOSGiFrameworkConsole;
import org.eclipse.libra.framework.editor.ui.internal.AbstractBundleEditorPage;
@@ -33,12 +34,13 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.commands.ICommandImageService;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.ManagedForm;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.internal.browser.ImageResource;
import org.eclipse.wst.server.ui.ServerUICore;
@@ -167,10 +169,12 @@ public class ServerConsoleEditorPage extends AbstractBundleEditorPage {
executeCommand(cmdLine);
}
};
- backAction.setImageDescriptor(ImageResource
- .getImageDescriptor(org.eclipse.ui.internal.browser.ImageResource.IMG_ELCL_NAV_BACKWARD));
- backAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_NAV_BACKWARD));
- backAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_NAV_BACKWARD));
+
+ final ICommandImageService service = getSite().getWorkbenchWindow().getService(ICommandImageService.class);
+ final ImageDescriptor imgDescBack = service.getImageDescriptor(IWorkbenchCommandConstants.NAVIGATE_BACK);
+ backAction.setImageDescriptor(imgDescBack);
+ backAction.setHoverImageDescriptor(imgDescBack);
+ backAction.setDisabledImageDescriptor(imgDescBack);
backAction.setEnabled(false);
toolBarManager.add(backAction);
@@ -182,13 +186,14 @@ public class ServerConsoleEditorPage extends AbstractBundleEditorPage {
executeCommand(cmdLine);
}
};
- forwardAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_NAV_FORWARD));
- forwardAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_NAV_FORWARD));
- forwardAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_NAV_FORWARD));
+ ImageDescriptor imgDescFwd = service.getImageDescriptor(IWorkbenchCommandConstants.NAVIGATE_FORWARD);
+ forwardAction.setImageDescriptor(imgDescFwd);
+ forwardAction.setHoverImageDescriptor(imgDescFwd);
+ forwardAction.setDisabledImageDescriptor(imgDescFwd);
forwardAction.setEnabled(false);
toolBarManager.add(forwardAction);
- refreshAction = new Action("Refresh from server", ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_NAV_REFRESH)) {
+ refreshAction = new Action("Refresh from server", service.getImageDescriptor(IWorkbenchCommandConstants.FILE_REFRESH)) {
@Override
public void run() {
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
index a119b9a..69f1a52 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
@@ -28,6 +28,7 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -62,12 +63,13 @@ import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.commands.ICommandImageService;
import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.ManagedForm;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.internal.browser.ImageResource;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.internal.editor.ServerEditorPartInput;
import org.eclipse.wst.server.ui.internal.editor.ServerResourceCommandManager;
@@ -273,10 +275,11 @@ public class BundleDependencyEditorPage extends AbstractBundleEditorPage impleme
new BundleDependencyUpdateJob(true).schedule();
}
};
- backAction.setImageDescriptor(ImageResource
- .getImageDescriptor(org.eclipse.ui.internal.browser.ImageResource.IMG_ELCL_NAV_BACKWARD));
- backAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_NAV_BACKWARD));
- backAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_NAV_BACKWARD));
+ final ICommandImageService service = getSite().getWorkbenchWindow().getService(ICommandImageService.class);
+ final ImageDescriptor imgDescBack = service.getImageDescriptor(IWorkbenchCommandConstants.NAVIGATE_BACK);
+ backAction.setImageDescriptor(imgDescBack);
+ backAction.setHoverImageDescriptor(imgDescBack);
+ backAction.setDisabledImageDescriptor(imgDescBack);
backAction.setEnabled(false);
toolBarManager.add(backAction);
@@ -290,13 +293,14 @@ public class BundleDependencyEditorPage extends AbstractBundleEditorPage impleme
new BundleDependencyUpdateJob(true).schedule();
}
};
- forwardAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_NAV_FORWARD));
- forwardAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_NAV_FORWARD));
- forwardAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_NAV_FORWARD));
+ ImageDescriptor imgDescFwd = service.getImageDescriptor(IWorkbenchCommandConstants.NAVIGATE_FORWARD);
+ forwardAction.setImageDescriptor(imgDescFwd);
+ forwardAction.setHoverImageDescriptor(imgDescFwd);
+ forwardAction.setDisabledImageDescriptor(imgDescFwd);
forwardAction.setEnabled(false);
toolBarManager.add(forwardAction);
- refreshAction = new Action("Refresh from server", ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_NAV_REFRESH)) {
+ refreshAction = new Action("Refresh from server", service.getImageDescriptor(IWorkbenchCommandConstants.FILE_REFRESH)) {
@Override
public void run() {
diff --git a/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java b/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
index 2ef6a6c..0c583e6 100644
--- a/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
+++ b/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
@@ -17,9 +17,9 @@ import java.beans.PropertyChangeListener;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.IOSGIExecutionEnvironment;
import org.eclipse.libra.framework.core.IOSGIFrameworkInstance;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.equinox.IEquinoxFrameworkInstance;
import org.eclipse.libra.framework.ui.ContextIds;
import org.eclipse.libra.framework.ui.Messages;
@@ -216,7 +216,7 @@ public class JavaProfileEditorSection extends ServerEditorSection {
ITargetDefinition newTarget = wizard.getTargetDefinition();
frameworkInstance.getFrameworkInstanceConfiguration()
.setTargetDefinition(newTarget);
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
service.saveTargetDefinition(newTarget);
}
}
diff --git a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxFrameworkInstance.java b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxFrameworkInstance.java
index 8674628..2949592 100644
--- a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxFrameworkInstance.java
@@ -19,10 +19,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceConfiguration;
import org.eclipse.libra.framework.core.FrameworkInstanceDelegate;
import org.eclipse.libra.framework.core.OSGIFrameworkInstanceBehaviorDelegate;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.core.Trace;
import org.eclipse.libra.framework.equinox.internal.EquinoxFrameworkInstanceBehavior;
import org.eclipse.pde.core.target.ITargetDefinition;
@@ -127,7 +127,7 @@ public class EquinoxFrameworkInstance extends FrameworkInstanceDelegate implemen
//IPath installPath = getServer().getRuntime().getLocation();
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
ITargetDefinition targetDefinition = service.newTarget();
targetDefinition.setName(getServer().getName());
diff --git a/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/FelixFrameworkInstance.java b/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/FelixFrameworkInstance.java
index 51f49ed..b52af07 100644
--- a/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/FelixFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/FelixFrameworkInstance.java
@@ -16,10 +16,10 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceConfiguration;
import org.eclipse.libra.framework.core.FrameworkInstanceDelegate;
import org.eclipse.libra.framework.core.OSGIFrameworkInstanceBehaviorDelegate;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.core.Trace;
import org.eclipse.libra.framework.felix.internal.FelixRuntimeInstanceBehavior;
import org.eclipse.pde.core.target.ITargetDefinition;
@@ -113,7 +113,7 @@ public class FelixFrameworkInstance extends FrameworkInstanceDelegate implements
private static ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
ITargetLocation[] containers = new ITargetLocation[2];
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
containers[0] = service.newDirectoryLocation(
installPath.append("bin").makeAbsolute()
@@ -130,7 +130,7 @@ public class FelixFrameworkInstance extends FrameworkInstanceDelegate implements
public ITargetDefinition createDefaultTarget() throws CoreException {
IPath installPath = getServer().getRuntime().getLocation();
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
ITargetDefinition targetDefinition = service.newTarget();
targetDefinition.setName(getServer().getName());
diff --git a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
index 46bbf82..b9d19d7 100644
--- a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
@@ -20,10 +20,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceConfiguration;
import org.eclipse.libra.framework.core.FrameworkInstanceDelegate;
import org.eclipse.libra.framework.core.OSGIFrameworkInstanceBehaviorDelegate;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.core.Trace;
import org.eclipse.libra.framework.jonas.internal.JonasFrameworkInstanceBehavior;
import org.eclipse.pde.core.target.ITargetDefinition;
@@ -125,7 +125,7 @@ public class JonasFrameworkInstance extends FrameworkInstanceDelegate implements
scanner.setIncludes(new String[]{"**/*.jar"});
scanner.scan();
String[] bundles = scanner.getIncludedFiles();
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
if(bundles != null && bundles.length>0){
@@ -150,7 +150,7 @@ public class JonasFrameworkInstance extends FrameworkInstanceDelegate implements
@Override
public ITargetDefinition createDefaultTarget() throws CoreException {
IPath installPath = getServer().getRuntime().getLocation();
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
ITargetDefinition targetDefinition = service.newTarget();
targetDefinition.setName(getServer().getName());
diff --git a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
index dc171c1..adbca6c 100644
--- a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
@@ -21,10 +21,10 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceConfiguration;
import org.eclipse.libra.framework.core.FrameworkInstanceDelegate;
import org.eclipse.libra.framework.core.OSGIFrameworkInstanceBehaviorDelegate;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.core.Trace;
import org.eclipse.libra.framework.knopflerfish.internal.KnopflerfishFrameworkInstanceBehavior;
import org.eclipse.pde.core.target.ITargetDefinition;
@@ -128,7 +128,7 @@ public class KnopflerfishFrameworkInstance extends FrameworkInstanceDelegate
IPath installPath = getServer().getRuntime().getLocation();
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
ITargetDefinition targetDefinition = service.newTarget();
targetDefinition.setName(getServer().getName());
@@ -183,7 +183,7 @@ public class KnopflerfishFrameworkInstance extends FrameworkInstanceDelegate
private static ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
ITargetLocation[] containers = new ITargetLocation[8];
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
containers[0] = service.newDirectoryLocation(
installPath.append("osgi").makeAbsolute()
.toPortableString());
diff --git a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/FrameworkInstanceLocationEditorSection.java b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/FrameworkInstanceLocationEditorSection.java
index cd116c2..0772d94 100644
--- a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/FrameworkInstanceLocationEditorSection.java
+++ b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/FrameworkInstanceLocationEditorSection.java
@@ -28,9 +28,9 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceDelegate;
import org.eclipse.libra.framework.core.IOSGIFrameworkInstance;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.ui.ContextIds;
import org.eclipse.libra.framework.ui.FrameworkUIPlugin;
import org.eclipse.libra.framework.ui.Messages;
@@ -442,7 +442,7 @@ public class FrameworkInstanceLocationEditorSection extends ServerEditorSection
// Replace all references to the original with the new target
ITargetDefinition newTarget = wizard.getTargetDefinition();
frameworkInstance.getFrameworkInstanceConfiguration().setTargetDefinition(newTarget);
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
service.saveTargetDefinition(newTarget);
}
}
diff --git a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
index d5bc941..350f328 100644
--- a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
+++ b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
@@ -35,10 +35,10 @@ import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
import org.eclipse.jface.window.Window;
+import org.eclipse.libra.framework.core.FrameworkCorePlugin;
import org.eclipse.libra.framework.core.FrameworkInstanceConfiguration;
import org.eclipse.libra.framework.core.IOSGIFrameworkInstance;
import org.eclipse.libra.framework.core.IOSGIFrameworkWorkingCopy;
-import org.eclipse.libra.framework.core.TargetDefinitionUtil;
import org.eclipse.libra.framework.core.Trace;
import org.eclipse.pde.core.target.ITargetDefinition;
import org.eclipse.pde.core.target.ITargetPlatformService;
@@ -719,7 +719,7 @@ public class TargetDefinitionEditorPart extends ServerEditorPart {
try {
runtimeInstance.getFrameworkInstanceConfiguration()
.setTargetDefinition(getTargetDefinition());
- ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
+ ITargetPlatformService service = FrameworkCorePlugin.getTargetPlatformService();
service.saveTargetDefinition(getTargetDefinition());
} catch (CoreException e) {
e.printStackTrace();
diff --git a/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/editor/WebXMLInputContext.java b/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/editor/WebXMLInputContext.java
index f90cca7..837859b 100644
--- a/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/editor/WebXMLInputContext.java
+++ b/plugins/org.eclipse.libra.warproducts.ui/src/org/eclipse/libra/warproducts/ui/editor/WebXMLInputContext.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.libra.warproducts.ui.editor;
+import java.nio.charset.Charset;
import java.util.ArrayList;
import org.eclipse.core.resources.IFile;
@@ -55,7 +56,7 @@ public class WebXMLInputContext extends XMLInputContext {
if( isReconciling ) {
IFile file = ( ( IFileEditorInput ) input ).getFile();
model.setUnderlyingResource( file );
- model.setCharset( file.getCharset() );
+ model.setCharset( Charset.forName( file.getCharset() ) );
}
return model;
}

Back to the top