Author: koen.aers(a)jboss.com
Date: 2011-06-08 07:28:06 -0400 (Wed, 08 Jun 2011)
New Revision: 31910
Added:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgeUIPlugin.java
Removed:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgePlugin.java
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.ui/plugin.xml
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/CommandRecorder.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/InputReadJob.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/StreamListener.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/launching/ForgeRuntime.java
Log:
remove seam references
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF 2011-06-08 11:17:56
UTC (rev 31909)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF 2011-06-08 11:28:06
UTC (rev 31910)
@@ -17,6 +17,6 @@
org.eclipse.ui.views
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.jboss.tools.forge.ForgePlugin
+Bundle-Activator: org.jboss.tools.forge.ForgeUIPlugin
Bundle-ClassPath: .,
lib/jline.jar
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/plugin.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/plugin.xml 2011-06-08 11:17:56 UTC (rev
31909)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/plugin.xml 2011-06-08 11:28:06 UTC (rev
31910)
@@ -10,7 +10,7 @@
<view
category="org.jboss.tools.forge"
class="org.jboss.tools.forge.view.ConsoleView"
- id="org.jboss.tools.seam.forge.console"
+ id="org.jboss.tools.forge.console"
name="Forge Console"
restorable="true">
</view>
@@ -18,29 +18,29 @@
<extension
point="org.eclipse.ui.viewActions">
<viewContribution
- id="org.jboss.tools.seam.forge.view"
- targetID="org.jboss.tools.seam.forge.console">
+ id="org.jboss.tools.forge.view"
+ targetID="org.jboss.tools.forge.console">
<menu
- id="org.jboss.tools.seam.forge.menubar"
- label="Seam Forge">
+ id="org.jboss.tools.forge.menubar"
+ label="Forge">
</menu>
<action
class="org.jboss.tools.forge.action.StopDelegate"
icon="icons/stop.gif"
- id="org.jboss.tools.seam.forge.stop"
+ id="org.jboss.tools.forge.stop"
label="Stop Forge"
- menubarPath="org.jboss.tools.seam.forge.menubar"
+ menubarPath="org.jboss.tools.forge.menubar"
style="push"
- toolbarPath="org.jboss.tools.seam.forge.toolbar">
+ toolbarPath="org.jboss.tools.forge.toolbar">
</action>
<action
class="org.jboss.tools.forge.action.StartDelegate"
icon="icons/start.gif"
- id="org.jboss.tools.seam.forge.start"
+ id="org.jboss.tools.forge.start"
label="Start Forge"
- menubarPath="org.jboss.tools.seam.forge.menu"
+ menubarPath="org.jboss.tools.forge.menu"
style="push"
- toolbarPath="org.jboss.tools.seam.forge.toolbar">
+ toolbarPath="org.jboss.tools.forge.toolbar">
</action>
</viewContribution>
</extension>
@@ -48,13 +48,13 @@
<page
name="Forge"
class="org.jboss.tools.forge.preferences.EmptyPreferencePage"
- id="org.jboss.tools.seam.forge">
+ id="org.jboss.tools.forge">
</page>
<page
name="Installed Forge Runtimes"
- category="org.jboss.tools.seam.forge"
+ category="org.jboss.tools.forge"
class="org.jboss.tools.forge.preferences.ForgeInstallationsPreferencePage"
- id="org.jboss.tools.seam.forge.runtimes">
+ id="org.jboss.tools.forge.runtimes">
</page>
</extension>
Deleted:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgePlugin.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgePlugin.java 2011-06-08
11:17:56 UTC (rev 31909)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgePlugin.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -1,40 +0,0 @@
-package org.jboss.tools.forge;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.jboss.tools.forge.launching.ForgeRuntime;
-import org.osgi.framework.BundleContext;
-
-public class ForgePlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.jboss.tools.seam.forge";
-
- private static ForgePlugin plugin;
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- public void stop(BundleContext context) throws Exception {
- if (ForgeRuntime.INSTANCE.isForgeRunning()) {
- ForgeRuntime.INSTANCE.stopForge();
- }
- plugin = null;
- super.stop(context);
- }
-
- public static ForgePlugin getDefault() {
- return plugin;
- }
-
- public static void log(Throwable t) {
- getDefault().getLog().log(newErrorStatus("Error logged from Forge Plugin: ",
t));
- }
-
- private static IStatus newErrorStatus(String message, Throwable exception) {
- return new Status(IStatus.ERROR, PLUGIN_ID, IStatus.INFO, message, exception);
- }
-
-}
Copied:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgeUIPlugin.java
(from rev 31904,
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgePlugin.java)
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgeUIPlugin.java
(rev 0)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ForgeUIPlugin.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -0,0 +1,40 @@
+package org.jboss.tools.forge;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.forge.launching.ForgeRuntime;
+import org.osgi.framework.BundleContext;
+
+public class ForgeUIPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.forge.ui";
+
+ private static ForgeUIPlugin plugin;
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ if (ForgeRuntime.INSTANCE.isForgeRunning()) {
+ ForgeRuntime.INSTANCE.stopForge();
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static ForgeUIPlugin getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable t) {
+ getDefault().getLog().log(newErrorStatus("Error logged from Forge Plugin: ",
t));
+ }
+
+ private static IStatus newErrorStatus(String message, Throwable exception) {
+ return new Status(IStatus.ERROR, PLUGIN_ID, IStatus.INFO, message, exception);
+ }
+
+}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/CommandRecorder.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/CommandRecorder.java 2011-06-08
11:17:56 UTC (rev 31909)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/CommandRecorder.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -24,7 +24,7 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.eclipse.ui.texteditor.ITextEditor;
-import org.jboss.tools.forge.ForgePlugin;
+import org.jboss.tools.forge.ForgeUIPlugin;
import org.jboss.tools.forge.importer.ProjectConfigurationUpdater;
import org.jboss.tools.forge.importer.ProjectImporter;
@@ -106,7 +106,7 @@
try {
project.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
if ("pwd".equals(currentCommand)) {
@@ -148,7 +148,7 @@
((ISetSelectionTarget)packageExplorer).selectReveal(new
StructuredSelection(objectToSelect));
}
} catch (PartInitException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
} else if ("entity".equals(currentCommand)) {
int index = beforePrompt.lastIndexOf("Picked up type <JavaResource>:
");
@@ -165,7 +165,7 @@
try {
objectToSelect = ((ICompilationUnit)javaElement).getTypes()[0];
} catch (JavaModelException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
IViewPart projectExplorer =
workbenchPage.findView("org.eclipse.ui.navigator.ProjectExplorer");
@@ -180,7 +180,7 @@
((ISetSelectionTarget)packageExplorer).selectReveal(new
StructuredSelection(objectToSelect));
}
} catch (PartInitException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
} else if ("field".equals(currentCommand)) {
try {
@@ -213,11 +213,11 @@
}
}
} catch (JavaModelException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
} catch (PartInitException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
} else if ("prettyfaces".equals(currentCommand)) {
int index = beforePrompt.lastIndexOf("***SUCCESS*** Installed
[com.ocpsoft.prettyfaces] successfully.");
@@ -249,7 +249,7 @@
((ISetSelectionTarget)packageExplorer).selectReveal(new
StructuredSelection(objectToSelect));
}
} catch (PartInitException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
} else if ("build".equals(currentCommand)) {
@@ -257,9 +257,9 @@
}
try {
- workbenchPage.showView("org.jboss.tools.seam.forge.console").setFocus();
+ workbenchPage.showView("org.jboss.tools.forge.console").setFocus();
} catch (PartInitException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/InputReadJob.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/InputReadJob.java 2011-06-08
11:17:56 UTC (rev 31909)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/InputReadJob.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -7,7 +7,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.model.IStreamsProxy;
-import org.jboss.tools.forge.ForgePlugin;
+import org.jboss.tools.forge.ForgeUIPlugin;
class InputReadJob extends Job {
@@ -30,7 +30,7 @@
buffer.setLength(0);
}
} catch (IOException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
return Status.OK_STATUS;
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/StreamListener.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/StreamListener.java 2011-06-08
11:17:56 UTC (rev 31909)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/console/StreamListener.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -4,7 +4,7 @@
import org.eclipse.debug.core.IStreamListener;
import org.eclipse.debug.core.model.IStreamMonitor;
-import org.jboss.tools.forge.ForgePlugin;
+import org.jboss.tools.forge.ForgeUIPlugin;
class StreamListener implements IStreamListener {
@@ -32,7 +32,7 @@
buffer = new StringBuffer();
}
} catch (IOException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/launching/ForgeRuntime.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/launching/ForgeRuntime.java 2011-06-08
11:17:56 UTC (rev 31909)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/launching/ForgeRuntime.java 2011-06-08
11:28:06 UTC (rev 31910)
@@ -44,7 +44,7 @@
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
-import org.jboss.tools.forge.ForgePlugin;
+import org.jboss.tools.forge.ForgeUIPlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -73,10 +73,10 @@
}
private static void initializeInstallations() {
- String installPrefsXml =
ForgePlugin.getDefault().getPreferenceStore().getString(PREF_FORGE_INSTALLATIONS);
+ String installPrefsXml =
ForgeUIPlugin.getDefault().getPreferenceStore().getString(PREF_FORGE_INSTALLATIONS);
if (installPrefsXml == null || "".equals(installPrefsXml)) {
createInitialInstallations();
- installPrefsXml =
ForgePlugin.getDefault().getPreferenceStore().getString(PREF_FORGE_INSTALLATIONS);
+ installPrefsXml =
ForgeUIPlugin.getDefault().getPreferenceStore().getString(PREF_FORGE_INSTALLATIONS);
}
initializeFromXml(installPrefsXml);
}
@@ -112,9 +112,9 @@
try {
result = documentBuilder.parse(inputStream);
} catch (SAXException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
} catch (IOException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
return result;
}
@@ -124,7 +124,7 @@
try {
result = new BufferedInputStream(new
ByteArrayInputStream(string.getBytes("UTF8")));
} catch (UnsupportedEncodingException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
return result;
}
@@ -133,7 +133,7 @@
try {
return DocumentBuilderFactory.newInstance().newDocumentBuilder();
} catch (ParserConfigurationException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
return null;
}
}
@@ -161,13 +161,13 @@
private static void createInitialInstallations() {
try {
- File file = FileLocator.getBundleFile(ForgePlugin.getDefault().getBundle());
+ File file = FileLocator.getBundleFile(ForgeUIPlugin.getDefault().getBundle());
defaultInstallation = new ForgeInstallation("embedded",
file.getAbsolutePath());
installations = new ArrayList<ForgeInstallation>();
installations.add(defaultInstallation);
saveInstallations();
} catch (IOException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
@@ -183,11 +183,11 @@
private static void saveInstallations() {
try {
String xml = serializeDocument(createInstallationsDocument());
- ForgePlugin.getDefault().getPreferenceStore().setValue(PREF_FORGE_INSTALLATIONS,
xml);
+ ForgeUIPlugin.getDefault().getPreferenceStore().setValue(PREF_FORGE_INSTALLATIONS,
xml);
} catch (IOException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
} catch (TransformerException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}
@@ -208,10 +208,10 @@
public static final ForgeRuntime INSTANCE = new ForgeRuntime();
- public static final String STATE_NOT_RUNNING =
"org.jboss.tools.seam.forge.notRunning";
- public static final String STATE_RUNNING =
"org.jboss.tools.seam.forge.running";
- public static final String STATE_STARTING =
"org.jboss.tools.seam.forge.starting";
- public static final String STATE_STOPPING =
"org.jboss.tools.seam.forge.stopping";
+ public static final String STATE_NOT_RUNNING =
"org.jboss.tools.forge.notRunning";
+ public static final String STATE_RUNNING = "org.jboss.tools.forge.running";
+ public static final String STATE_STARTING = "org.jboss.tools.forge.starting";
+ public static final String STATE_STOPPING = "org.jboss.tools.forge.stopping";
private IProcess forgeProcess = null;
private String runtimeState = STATE_NOT_RUNNING;
@@ -232,7 +232,7 @@
ILaunchConfiguration[] configurations = manager.getLaunchConfigurations(type);
for (int i = 0; i < configurations.length; i++) {
ILaunchConfiguration configuration = configurations[i];
- if (configuration.getName().equals("Seam Forge")) {
+ if (configuration.getName().equals("Forge")) {
configuration.delete();
break;
}
@@ -240,7 +240,7 @@
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null,
"Forge");
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
"org.jboss.forge.shell.Bootstrap");
List<String> classpath = new ArrayList<String>();
-// Bundle bundle = Platform.getBundle("org.jboss.tools.seam.forge");
+// Bundle bundle = Platform.getBundle("org.jboss.tools.forge");
File file = null;
// try {
// file = FileLocator.getBundleFile(bundle);
@@ -250,7 +250,7 @@
// }
// if (file == null) return;
if (!file.exists()) {
- ForgePlugin.log(new RuntimeException("Not a correct Forge runtime."));
+ ForgeUIPlugin.log(new RuntimeException("Not a correct Forge runtime."));
setRuntimeState(STATE_NOT_RUNNING);
return;
}
@@ -261,7 +261,7 @@
}
});
if (children.length != 1) {
- ForgePlugin.log(new RuntimeException("Not a correct Forge runtime."));
+ ForgeUIPlugin.log(new RuntimeException("Not a correct Forge runtime."));
setRuntimeState(STATE_NOT_RUNNING);
return;
}
@@ -290,7 +290,6 @@
IPath path = root.getLocation();
File workingDir = path.toFile();
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
workingDir.getAbsolutePath());
-// workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
"-Dseam.forge.shell.colorEnabled=true");
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
"-Dforge.compatibility.IDE=true");
ILaunchConfiguration configuration = workingCopy.doSave();
ILaunch launch = configuration.launch(ILaunchManager.RUN_MODE, null, false, false);
@@ -302,7 +301,7 @@
setRuntimeState(STATE_RUNNING);
}
} catch (CoreException e) {
- ForgePlugin.log(e);
+ ForgeUIPlugin.log(e);
}
}