Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jet.ui')
-rw-r--r--plugins/org.eclipse.jet.ui/.classpath7
-rw-r--r--plugins/org.eclipse.jet.ui/.cvsignore3
-rw-r--r--plugins/org.eclipse.jet.ui/.project28
-rw-r--r--plugins/org.eclipse.jet.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.jet.ui/.settings/org.eclipse.jdt.core.prefs70
-rw-r--r--plugins/org.eclipse.jet.ui/META-INF/MANIFEST.MF27
-rw-r--r--plugins/org.eclipse.jet.ui/NewJETProject.p1.wzPage.xml42
-rw-r--r--plugins/org.eclipse.jet.ui/NewJETProject.p2.wzPage.xml72
-rw-r--r--plugins/org.eclipse.jet.ui/about.html29
-rw-r--r--plugins/org.eclipse.jet.ui/build.properties19
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JET2File.gifbin920 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JET2LaunchIcon.gifbin920 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JET2Project.gifbin971 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JET2ProjectWizard.gifbin597 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JET2ProjectWizardBanner.gifbin3180 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/JETRuntimeError.gifbin949 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jet.ui/plugin.properties40
-rw-r--r--plugins/org.eclipse.jet.ui/plugin.xml137
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/filters/JavaFilter.java77
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/Messages.java129
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/messages.properties66
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JET2TransformationTabGroup.java48
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETConsoleColorProvider.java125
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETLaunchHelper.java311
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETTransformMainTab.java402
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/LaunchShortcut.java70
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/popup/actions/UnloadAction.java91
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/CompilePreferencePage.java313
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/ExtensionListEditor.java70
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/JETPreferencePage.java84
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/Activator.java82
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/Messages.java42
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1.java139
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1Controls.java183
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2.java169
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2Controls.java265
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectInfo.java109
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java193
-rw-r--r--plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/messages.properties19
40 files changed, 0 insertions, 3464 deletions
diff --git a/plugins/org.eclipse.jet.ui/.classpath b/plugins/org.eclipse.jet.ui/.classpath
deleted file mode 100644
index ce73933..0000000
--- a/plugins/org.eclipse.jet.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jet.ui/.cvsignore b/plugins/org.eclipse.jet.ui/.cvsignore
deleted file mode 100644
index 21c69d5..0000000
--- a/plugins/org.eclipse.jet.ui/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-org
-dump.xml
diff --git a/plugins/org.eclipse.jet.ui/.project b/plugins/org.eclipse.jet.ui/.project
deleted file mode 100644
index 337c3aa..0000000
--- a/plugins/org.eclipse.jet.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jet.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jet.ui/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.jet.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 0d55ce5..0000000
--- a/plugins/org.eclipse.jet.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Feb 23 13:40:34 EST 2006
-eclipse.preferences.version=1
-encoding//src/org/eclipse/jet/internal/ui/l10n/messages.properties=8859_1
diff --git a/plugins/org.eclipse.jet.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jet.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a641476..0000000
--- a/plugins/org.eclipse.jet.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,70 +0,0 @@
-#Sun Apr 20 15:46:33 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.jet.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jet.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 663d1b7..0000000
--- a/plugins/org.eclipse.jet.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jet.ui;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-Activator: org.eclipse.jet.ui.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jet;bundle-version="[0.7.0,1.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)"
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.jet.internal.ui.filters;x-internal:=true,
- org.eclipse.jet.internal.ui.l10n;x-internal:=true,
- org.eclipse.jet.internal.ui.launch;x-internal:=true,
- org.eclipse.jet.internal.ui.popup.actions;x-internal:=true,
- org.eclipse.jet.internal.ui.prefs;x-internal:=true,
- org.eclipse.jet.ui,
- org.eclipse.jet.ui.newproject
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.jet.ui/NewJETProject.p1.wzPage.xml b/plugins/org.eclipse.jet.ui/NewJETProject.p1.wzPage.xml
deleted file mode 100644
index 00ba758..0000000
--- a/plugins/org.eclipse.jet.ui/NewJETProject.p1.wzPage.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../ui.maker/schema.xsd">
- <wizardPage qualifiedName="org.eclipse.jet.ui.newproject.NewJETProjectPage1" helpContextId="org.eclipse.jet.ui.trjt0010">
- <baseClass qualifiedName="org.eclipse.ui.dialogs.WizardNewProjectCreationPage"/>
- <control parentID="TOP" id="gProjSet">
- <type><group text="Project Settings" shadow="NONE"><gridLayout numColumns="2"/></group></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <control parentID="gProjSet" id="lblTemplateFolder">
- <type><label text="&amp;Template folder:"/></type>
- </control>
- <control parentID="gProjSet" id="txtTemplateFolder">
- <var name="txtTemplateFolder"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <control parentID="gProjSet" id="lblJETOutput">
- <type><label text="J&amp;ET output folder:"/></type>
- </control>
- <control parentID="gProjSet" id="txtJETOutput">
- <var name="txtJETOutput"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <control parentID="gProjSet" id="lblJavaOutput">
- <type><label text="J&amp;ava output folder:"/></type>
- </control>
- <control parentID="gProjSet" id="txtJavaOutput">
- <var name="txtJavaOutput"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <control parentID="gProjSet" id="lblDefJavaPackage">
- <type><label text="Default &amp;Java package:"/></type>
- </control>
- <control parentID="gProjSet" id="txtDefJavaPackage">
- <var name="txtDefJavaPackage"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- </wizardPage>
-</root>
diff --git a/plugins/org.eclipse.jet.ui/NewJETProject.p2.wzPage.xml b/plugins/org.eclipse.jet.ui/NewJETProject.p2.wzPage.xml
deleted file mode 100644
index 08aa1d2..0000000
--- a/plugins/org.eclipse.jet.ui/NewJETProject.p2.wzPage.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../ui.maker/schema.xsd">
- <wizardPage qualifiedName="org.eclipse.jet.ui.newproject.NewJETProjectPage2" helpContextId="org.eclipse.jet.ui.trjt0020">
- <control parentID="TOP" id="top">
- <type><composite><gridLayout numColumns="1"/></composite></type>
- <gridData><hAlign value="FILL"/><vAlign value="FILL"/><hGrabExcessSpace/><vGrabExcessSpace/></gridData>
- </control>
- <control parentID="top" id="grpTransProps">
- <type><group text="Transformation (plug-in) Properties" shadow="NONE"><gridLayout numColumns="2"/></group></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <!-- Transformation ID: -->
- <control parentID="grpTransProps" id="lblID">
- <type><label text="Transformation &amp;ID:"/></type>
- </control>
- <control parentID="grpTransProps" id="txtID">
- <var name="txtID"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
-
- <!-- Transformation Name: -->
- <control parentID="grpTransProps" id="lblName">
- <type><label text="Transformation na&amp;me:"/></type>
- </control>
- <control parentID="grpTransProps" id="txtName">
- <var name="txtName"/>
- <type><text multi="false" readOnly="false"></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <!-- Description -->
- <control parentID="grpTransProps" id="lblDescription">
- <type><label text="Transformation &amp;description:"/></type>
- </control>
- <control parentID="grpTransProps" id="txtDescription">
- <var name="txtDescription"/>
- <type><text multi="false" readOnly="false"></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <!-- Template Loader -->
- <control parentID="grpTransProps" id="lblTemplateLoader">
- <type><label text="Template &amp;loader:"/></type>
- </control>
- <control parentID="grpTransProps" id="txtTemplateLoader">
- <var name="txtTemplateLoader"/>
- <type><text multi="false" readOnly="false"><modify/></text></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
-
- <!-- Extensions -->
- <control parentID="top" id="grpExtensions">
- <var name="grpExtensions"/>
- <type><group text="Extensions" shadow="NONE"><gridLayout numColumns="2"/></group></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- <control parentID="grpExtensions" id="cbxExtends">
- <var name="cbxExtends"/>
- <type><checkButton text="E&amp;xtend an existing JET Transformation"><selection/></checkButton></type>
- <gridData><hSpan columns="2"/></gridData>
- </control>
- <control parentID="grpExtensions" id="lblBaseTx">
- <var name="lblBaseTx"/>
- <type><label text="Base &amp;transformation:"/></type>
- <gridData><hIndent chars="4"/></gridData>
- </control>
- <control parentID="grpExtensions" id="ddlBaseTx">
- <var name="ddlBaseTx"/>
- <type><combo dropDown="true" readOnly="true"><modify/></combo></type>
- <gridData><hAlign value="FILL"/><hGrabExcessSpace/></gridData>
- </control>
- </wizardPage>
-</root>
diff --git a/plugins/org.eclipse.jet.ui/about.html b/plugins/org.eclipse.jet.ui/about.html
deleted file mode 100644
index d4f39ad..0000000
--- a/plugins/org.eclipse.jet.ui/about.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
- <h3>About This Content</h3>
-
- <p>June 5, 2007</p>
- <h3>License</h3>
-
- <p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).
- Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
- Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
- at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
- <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
- being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
- apply to your use of any object code in the Content. Check the Redistributor's license
- that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
- indicated below, the terms and conditions of the EPL still apply to any source code in the Content
- and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
- <p align="right"><small><a href="#top">go to top</a></small></p>
-
-</body>
-</html>
diff --git a/plugins/org.eclipse.jet.ui/build.properties b/plugins/org.eclipse.jet.ui/build.properties
deleted file mode 100644
index dfccf68..0000000
--- a/plugins/org.eclipse.jet.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- plugin.properties,\
- about.html
-src.includes = about.html
diff --git a/plugins/org.eclipse.jet.ui/icons/JET2File.gif b/plugins/org.eclipse.jet.ui/icons/JET2File.gif
deleted file mode 100644
index 8f74869..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JET2File.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/JET2LaunchIcon.gif b/plugins/org.eclipse.jet.ui/icons/JET2LaunchIcon.gif
deleted file mode 100644
index 1eab989..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JET2LaunchIcon.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/JET2Project.gif b/plugins/org.eclipse.jet.ui/icons/JET2Project.gif
deleted file mode 100644
index 1685dfa..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JET2Project.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizard.gif b/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizard.gif
deleted file mode 100644
index 8d97ee5..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizard.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizardBanner.gif b/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizardBanner.gif
deleted file mode 100644
index 945a6f5..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JET2ProjectWizardBanner.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/JETRuntimeError.gif b/plugins/org.eclipse.jet.ui/icons/JETRuntimeError.gif
deleted file mode 100644
index 66bc6e5..0000000
--- a/plugins/org.eclipse.jet.ui/icons/JETRuntimeError.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/icons/sample.gif b/plugins/org.eclipse.jet.ui/icons/sample.gif
deleted file mode 100644
index 34fb3c9..0000000
--- a/plugins/org.eclipse.jet.ui/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jet.ui/plugin.properties b/plugins/org.eclipse.jet.ui/plugin.properties
deleted file mode 100644
index 5de0f59..0000000
--- a/plugins/org.eclipse.jet.ui/plugin.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = JET Transformations UI Plug-in (Incubation)
-providerName = Eclipse Modeling Project
-
-newWizards.jet2Project.name = JET Transformation Project
-newWizards.jet2Project.description = Create a JET Transformation Project
-
-editors.jet2.name = JET Editor
-
-editorTemplates.name = JET Template
-
-preferencePages.jet2.name = JET Preferences
-preferencePages.templates.name = Templates
-
-javaElementFilters.javaInJET2Projects.name = Java elements from JET Transformation projects
-javaElementFilters.javaInJET2Projects.description = Hide Java elements such as Java source folders and reference libraries from JET Transformation projects
-
-popupMenus.group.jet2Debug = JET Debug
-popupMenus.action.unload = Unload
-
-launchShortcut.label = JET Transformation
-launchShortcut.contextLabel = Input for JET Transformation
-
-prefPage.jet.title = JET Transformations
-prefpage.jet.compilerOptions.title = Compiler Options
-
-propPage.jet.title = JET Compiler
-
-jet.wizards.category.name = JET Transformations
-
-runtime.error.label = JET Runtime Error
diff --git a/plugins/org.eclipse.jet.ui/plugin.xml b/plugins/org.eclipse.jet.ui/plugin.xml
deleted file mode 100644
index 529d4eb..0000000
--- a/plugins/org.eclipse.jet.ui/plugin.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- class="org.eclipse.jet.internal.ui.launch.JET2TransformationTabGroup"
- id="org.eclipse.jet.ui.launch.jet2Transformation.tabgroup"
- type="org.eclipse.jet.jet2Transformation"/>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.jet.jet2Transformation"
- icon="icons/JET2LaunchIcon.gif"
- id="org.eclipse.jet.ui.launch.jet2Transformation.icon"/>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="org.eclipse.jet.internal.ui.launch.LaunchShortcut"
- icon="icons/JET2LaunchIcon.gif"
- id="org.eclipse.jet.ui.shortcut1"
- label="%launchShortcut.label"
- modes="run">
- <contextualLaunch>
- <contextLabel
- label="%launchShortcut.contextLabel"
- mode="run"/>
- <enablement>
- <with variable="selection">
- <count value="1"/>
- <iterate operator="or">
- <test
- property="org.eclipse.debug.ui.matchesPattern"
- value="*.xml"/>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- <perspective id="org.eclipse.jdt.ui.JavaPerspective"/>
- <perspective id="org.eclipse.ui.resourcePerspective"/>
- </shortcut>
- </extension>
- <extension
- point="org.eclipse.jdt.ui.javaElementFilters">
- <filter
- class="org.eclipse.jet.internal.ui.filters.JavaFilter"
- description="%javaElementFilters.javaInJET2Projects.description"
- enabled="true"
- id="org.eclipse.jet.javafilter"
- name="%javaElementFilters.javaInJET2Projects.name"
- targetId="org.eclipse.jdt.ui.PackageExplorer"/>
- </extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- category="org.eclipse.jet.wizards"
- class="org.eclipse.jet.ui.newproject.NewProjectWizard"
- hasPages="true"
- icon="icons/JET2ProjectWizard.gif"
- id="org.eclipse.jet.ui.newJet2ProjectWizard"
- name="%newWizards.jet2Project.name"
- project="true">
- <description>%newWizards.jet2Project.description</description>
- </wizard>
- <category
- id="org.eclipse.jet.wizards"
- name="%jet.wizards.category.name"/>
- </extension>
-
- <extension
- point="org.eclipse.ui.editors.annotationTypes">
- <type
- markerSeverity="2"
- markerType="org.eclipse.jet.runtimeProblem"
- name="org.eclipse.jet.runtime.error"
- super="org.eclipse.ui.workbench.texteditor.error"/>
- </extension>
- <extension
- point="org.eclipse.ui.editors.markerAnnotationSpecification">
- <specification
- annotationType="org.eclipse.jet.runtime.error"
- colorPreferenceKey="jetErrorColor"
- colorPreferenceValue="255,0,0"
- icon="icons/JETRuntimeError.gif"
- includeOnPreferencePage="true"
- isGoToNextNavigationTarget="false"
- isGoToNextNavigationTargetKey="jetErrorIsGoToNextNavigationTarget"
- isGoToPreviousNavigationTarget="false"
- isGoToPreviousNavigationTargetKey="jetErrorIsGoToPrevNavigationTarget"
- label="%runtime.error.label"
- overviewRulerPreferenceKey="jetErrorOverviewRuler"
- overviewRulerPreferenceValue="true"
- showInNextPrevDropdownToolbarAction="true"
- showInNextPrevDropdownToolbarActionKey="jetErrorShowInNextPrevDowndownToolbarAction"
- textPreferenceKey="jetErrorText"
- textPreferenceValue="true"
- textStylePreferenceKey="jetErrorTextStyle"
- textStylePreferenceValue="SQUIGGLES"
- verticalRulerPreferenceKey="jetErrorVerticalRuler"
- verticalRulerPreferenceValue="true"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.jet.ui.jet"
- class="org.eclipse.jet.internal.ui.prefs.CompilePreferencePage"
- id="org.eclipse.jet.ui.compiler"
- name="%prefpage.jet.compilerOptions.title"/>
- <page
- class="org.eclipse.jet.internal.ui.prefs.JETPreferencePage"
- id="org.eclipse.jet.ui.jet"
- name="%prefPage.jet.title"/>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- adaptable="true"
- class="org.eclipse.jet.internal.ui.prefs.CompilePreferencePage"
- id="org.eclipse.jet.ui.project.jet"
- name="%propPage.jet.title"
- objectClass="org.eclipse.core.resources.IProject">
- <filter
- name="nature"
- value="org.eclipse.jet.jet2Nature"/>
- </page>
- </extension>
- <extension
- point="org.eclipse.debug.ui.consoleColorProviders">
- <consoleColorProvider
- class="org.eclipse.jet.internal.ui.launch.JETConsoleColorProvider"
- id="org.eclipse.jet.ui.consoleColorProvider"
- processType="org.eclipse.jet.process"/>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/filters/JavaFilter.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/filters/JavaFilter.java
deleted file mode 100644
index 160acc0..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/filters/JavaFilter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.internal.ui.filters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- * Filter Java elements from the Package Explorer view for JET2 projects.
- *
- */
-public class JavaFilter extends ViewerFilter {
-
- /**
- *
- */
- public JavaFilter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- final boolean isJET2Project = isJET2Project(parentElement);
- // Note: ClassPathContainer is a JDT internal class - it doesn't implement
- // any useful public interfacts (IAdapter and IWorkspaceAdapter only). To
- // avoid a direct internal dependency, we check the class name instead of
- // doing an instanceof. The risk is that JDT will refactor, and we will loose
- // this feature.
- if (element.getClass().getName().endsWith(".ClassPathContainer") && isJET2Project) { //$NON-NLS-1$
- return false;
- }
- if(element instanceof IPackageFragmentRoot && isJET2Project) {
- return false;
- }
- return true;
- }
-
- /**
- * @param element
- * @return
- * @throws CoreException
- */
- private boolean isJET2Project(Object element) {
- if(element instanceof IJavaProject) {
- IJavaProject jp = (IJavaProject)element;
- try {
- return jp.getProject().hasNature(JET2Platform.JET2_NATURE_ID);
- } catch (CoreException e) {
- // No action required:
- // only happens if the project doesn't exist. But we won't get here unless the project does
- }
- }
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/Messages.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/Messages.java
deleted file mode 100644
index 2a40b37..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/Messages.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jet.internal.ui.l10n;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jet.internal.ui.l10n.messages"; //$NON-NLS-1$
-
- private Messages() {
- }
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String CompilePreferencePage_BaseLocationsLabel;
-
- public static String CompilePreferencePage_CompileBaseTemplates;
-
- public static String CompilePreferencePage_DependenciesGroupLabel;
-
- public static String CompilePreferencePage_DeriveJavaFiles;
-
- public static String CompilePreferencePage_Description;
-
- public static String CompilePreferencePage_EnableProjectSettings;
-
- public static String CompilePreferencePage_FileExtensions;
-
- public static String CompilePreferencePage_InvalidBaseLocations;
-
- public static String CompilePreferencePage_JavaGenerationGroupLabel;
-
- public static String CompilePreferencePage_JavaPackage;
-
- public static String CompilePreferencePage_JET1_OPTION;
-
- public static String CompilePreferencePage_JET1OptionsGroupLabel;
-
- public static String CompilePreferencePage_JET2_Option;
-
- public static String CompilePreferencePage_JET2_OPTIONS_GROUP_LABEL;
-
- public static String CompilePreferencePage_JETComformanceGroupLabel;
-
- public static String CompilePreferencePage_OverrideTemplatesOption;
-
- public static String CompilePreferencePage_SourceFolder;
-
- public static String CompilePreferencePage_TemplatesDirLabel;
-
- public static String CompilePreferencePage_use_java5;
-
- public static String ExtensionListEditor_AddDialogErrorMsg;
-
- public static String ExtensionListEditor_AddDialogPrompt;
-
- public static String ExtensionListEditor_AddDialogTitle;
-
- public static String JETPreferencePage_Description;
-
- public static String JETPreferencePage_LocationsAddDialogTitle;
-
- public static String JETPreferencePage_LocationsLabel;
-
- public static String JETTransformMainTab_BrowseButtonLabel;
-
- public static String JETTransformMainTab_DebugSeverity;
-
- public static String JETTransformMainTab_DescriptionLabel;
-
- public static String JETTransformMainTab_DisplayMessage_Gropu;
-
- public static String JETTransformMainTab_ErrorSeverity;
-
- public static String JETTransformMainTab_IdLabel;
-
- public static String JETTransformMainTab_InformationSeverity;
-
- public static String JETTransformMainTab_NameLabel;
-
- public static String JETTransformMainTab_SelectResourceDialogTitle;
-
- public static String JETTransformMainTab_SeverityLabel;
-
- public static String JETTransformMainTab_TraceSeverity;
-
- public static String JETTransformMainTab_TransformGroupLabel;
-
- public static String JETTransformMainTab_TransformInputGroup;
-
- public static String JETTransformMainTab_WarningSeverity;
-
- public static String LaunchShortcut_DefaultLaunchName;
-
- public static String NewProjectWizard_WindowTitle;
-
- public static String NewProjectWizard_ErrorCreatingProject;
-
- public static String NewProjectWizard_MainPageTabText;
-
- public static String NewProjectWizard_MainPageTitle;
-
- public static String NewProjectWizard_MainPageDescription;
-
- public static String LaunchWizard_MainTab_Name;
-
- public static String JET2TemplateAccess_ErrorLoadingTemplateStore;
-
- public static String UnloadAction_DialogTitle;
-
- public static String UnloadAction_UnloadSuccessful;
-
- public static String UnloadAction_UnloadFailed;
-
- public static String UnloadAction_NotLoaded;
-
- public static String NewProjectWizard_ErrorInJETTransform;
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/messages.properties b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/messages.properties
deleted file mode 100644
index db65712..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/l10n/messages.properties
+++ /dev/null
@@ -1,66 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-NewProjectWizard_WindowTitle=New JET Transformation Project
-NewProjectWizard_ErrorCreatingProject=Error attempting to create project
-NewProjectWizard_ErrorInJETTransform=The JET transformation that creates the new project had execution errors
-NewProjectWizard_MainPageTabText=Main
-NewProjectWizard_MainPageTitle=JET Transformation Project
-NewProjectWizard_MainPageDescription=Create a JET Transformation Project in the workspace.
-
-LaunchShortcut_DefaultLaunchName=JET Transformation
-LaunchWizard_MainTab_Name=&Main
-
-JET2TemplateAccess_ErrorLoadingTemplateStore=Error loading editor template store.
-JETTransformMainTab_SelectResourceDialogTitle=Select resource
-
-UnloadAction_DialogTitle=Unload JET Transformation
-UnloadAction_UnloadSuccessful=Unloaded "{0}". Refresh the Plugins View to confirm success.
-UnloadAction_UnloadFailed=Failed to unloaded "{0}". Reason: {1}.
-UnloadAction_NotLoaded=Bundle is not loaded "{0}". No action was taken.
-
-JETTransformMainTab_TransformGroupLabel=Transformation
-JETTransformMainTab_DescriptionLabel=Description:
-JETTransformMainTab_SeverityLabel=&Severity (at or above):
-JETTransformMainTab_ErrorSeverity=error
-JETTransformMainTab_WarningSeverity=warning
-JETTransformMainTab_DebugSeverity=debug
-JETTransformMainTab_NameLabel=Name:
-JETPreferencePage_Description=JET General options
-JETTransformMainTab_IdLabel=&ID:
-JETTransformMainTab_TransformInputGroup=&Transformation Input
-JETTransformMainTab_DisplayMessage_Gropu=Display Messages
-JETTransformMainTab_InformationSeverity=information
-JETTransformMainTab_TraceSeverity=trace
-JETTransformMainTab_BrowseButtonLabel=&Browse...
-CompilePreferencePage_Description=JET Compiler options
-CompilePreferencePage_EnableProjectSettings=&Enable Project specific settings
-CompilePreferencePage_JETComformanceGroupLabel=Generate Method Conformance
-CompilePreferencePage_JET2_OPTIONS_GROUP_LABEL=JET2 Options
-CompilePreferencePage_JET1OptionsGroupLabel=JET1 Options
-CompilePreferencePage_JavaGenerationGroupLabel=Java Generation Options
-CompilePreferencePage_InvalidBaseLocations=Base locations must be a comma seperated lists of URIs
-CompilePreferencePage_DependenciesGroupLabel=Dependencies (JET1 only)
-CompilePreferencePage_OverrideTemplatesOption=&Override templates from a base plug-in
-CompilePreferencePage_CompileBaseTemplates=&Compile all base templates to Java classes in this project
-CompilePreferencePage_JavaPackage=Default Java &Package:
-CompilePreferencePage_JET1_OPTION=JET&1 - String generate(Object argument)
-CompilePreferencePage_JET2_Option=JET&2 - void generate(JET2Context context, JET2Writer out)
-CompilePreferencePage_use_java5=Use &Java 5 language features
-CompilePreferencePage_FileExtensions=&File extensions for templates:
-CompilePreferencePage_SourceFolder=Java &Source folder:
-CompilePreferencePage_DeriveJavaFiles=&Hide compiled Java from Team system (mark .java files derived)
-CompilePreferencePage_BaseLocationsLabel=&Base Location URIs (comma separated):
-CompilePreferencePage_TemplatesDirLabel=Templates directory
-ExtensionListEditor_AddDialogTitle=Add extension
-ExtensionListEditor_AddDialogPrompt=Enter an extension
-ExtensionListEditor_AddDialogErrorMsg=Extension must be a sequence of letters and/or digits
-JETPreferencePage_LocationsLabel=&Additional locations for JET Transformations
-JETPreferencePage_LocationsAddDialogTitle=Select a Folder
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JET2TransformationTabGroup.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JET2TransformationTabGroup.java
deleted file mode 100644
index 44035bf..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JET2TransformationTabGroup.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- * /
- *******************************************************************************/
-
-package org.eclipse.jet.internal.ui.launch;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-
-/**
- * @author pelder
- *
- */
-public class JET2TransformationTabGroup extends
- AbstractLaunchConfigurationTabGroup {
-
- /**
- *
- */
- public JET2TransformationTabGroup() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-// new JET2TransformMainTab(),
- new JETTransformMainTab(),
- new CommonTab(),
- };
-
- setTabs(tabs);
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETConsoleColorProvider.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETConsoleColorProvider.java
deleted file mode 100644
index 24b7db0..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETConsoleColorProvider.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.internal.ui.launch;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.console.ConsoleColorProvider;
-import org.eclipse.debug.ui.console.IConsole;
-import org.eclipse.debug.ui.console.IConsoleColorProvider;
-import org.eclipse.jet.internal.JETPreferences;
-import org.eclipse.jet.internal.launch.JETProcess;
-import org.eclipse.jet.internal.launch.JETStreamsProxy;
-import org.eclipse.jet.ui.Activator;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Colorize the JET execution console
- *
- */
-public class JETConsoleColorProvider extends ConsoleColorProvider implements IConsoleColorProvider {
-
- private Map colors;
- /**
- *
- */
- public JETConsoleColorProvider() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.console.IConsoleColorProvider#connect(org.eclipse.debug.core.model.IProcess, org.eclipse.debug.ui.console.IConsole)
- */
- public void connect(IProcess process, IConsole console) {
- colors = new HashMap();
- JETProcess jetProcess = (JETProcess) process;
- final JETStreamsProxy jetStreamsProxy = (JETStreamsProxy) jetProcess
- .getStreamsProxy();
-
- if (jetStreamsProxy != null) {
- if (jetStreamsProxy.getWarningStreamMonitor() != null) {
- console.connect(jetStreamsProxy.getWarningStreamMonitor(),
- JETStreamsProxy.JET_WARNING_STREAM);
- }
- if (jetStreamsProxy.getTraceStreamMonitor() != null) {
- console.connect(jetStreamsProxy.getTraceStreamMonitor(),
- JETStreamsProxy.JET_TRACE_STREAM);
- }
- if (jetStreamsProxy.getDebugStreamMonitor() != null) {
- console.connect(jetStreamsProxy.getDebugStreamMonitor(),
- JETStreamsProxy.JET_DEBUG_STREAM);
- }
- }
- super.connect(process, console);
- }
-
- public void disconnect() {
- for (Iterator i = colors.values().iterator(); i.hasNext();) {
- Color color = (Color) i.next();
- color.dispose();
- }
- colors.clear();
- super.disconnect();
- }
-
- private Color getPrefColor(String prefKey) {
- Color color = (Color) colors.get(prefKey);
- if(color == null) {
- final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- final RGB rgb = PreferenceConverter.getColor(store, prefKey);
- color = new Color(Display.getCurrent(), rgb);
- colors.put(prefKey, color);
- }
- return color;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.console.IConsoleColorProvider#getColor(java.lang.String)
- */
- public Color getColor(String streamIdentifer) {
- if (streamIdentifer.equals(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM)) {
- return getPrefColor(JETPreferences.CONSOLE_INFO_COLOR);
- }
- if (streamIdentifer.equals(IDebugUIConstants.ID_STANDARD_ERROR_STREAM)) {
- return getPrefColor(JETPreferences.CONSOLE_ERROR_COLOR);
- }
- if (streamIdentifer.equals(JETStreamsProxy.JET_DEBUG_STREAM)) {
- return getPrefColor(JETPreferences.CONSOLE_DEBUG_COLOR);
- }
- if (streamIdentifer.equals(JETStreamsProxy.JET_TRACE_STREAM)) {
- return getPrefColor(JETPreferences.CONSOLE_TRACE_COLOR);
- }
- if (streamIdentifer.equals(JETStreamsProxy.JET_WARNING_STREAM)) {
- return getPrefColor(JETPreferences.CONSOLE_WARNING_COLOR);
- }
- return super.getColor(streamIdentifer);
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETLaunchHelper.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETLaunchHelper.java
deleted file mode 100644
index 2fe324c..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETLaunchHelper.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-package org.eclipse.jet.internal.ui.launch;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-import org.eclipse.jet.transform.JETLaunchConstants;
-import org.eclipse.jet.ui.Activator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class JETLaunchHelper {
-
- private static ILaunchConfigurationType jetLaunchType = getConfigurationType();
- /**
- * @param resource
- * @param mode
- */
- public static ILaunchConfiguration createConfig(String id,
- IResource resource) {
- try {
- final ILaunchConfigurationWorkingCopy wConfig = jetLaunchType
- .newInstance(null, generateLaunchName(id, resource,
- Messages.LaunchShortcut_DefaultLaunchName));
- wConfig.setAttribute(JETLaunchConstants.ID, id);
- wConfig.setAttribute(JETLaunchConstants.SOURCE,
- resource != null
- ? resource.getFullPath().toString()
- : ""); //$NON-NLS-1$
- final ILaunchConfiguration config = wConfig.doSave();
- return config;
- } catch (CoreException e) {
- throw convertToRuntimeException(e);
- }
- }
-
- public static void findAndLaunchForTransformAndResource(Shell shell, String mode, String transformId, IResource resource) {
- ILaunchConfiguration[] configs = findConfigsForTransformAndResource(mode, transformId, resource);
- ILaunchConfiguration configToLaunch;
- switch(configs.length) {
- case 0:
- configToLaunch = createConfig(transformId, resource);
- break;
- case 1:
- configToLaunch = configs[0];
- break;
- default:
- configToLaunch = chooseExistingConfig(shell, configs);
- break;
- }
- if(configToLaunch != null) {
- DebugUITools.launch(configToLaunch, mode);
- }
- }
-
- public static boolean findAndLaunchForTransform(Shell shell, String mode, String transformId, boolean showConfigFirst) {
- ILaunchConfiguration[] configs = findConfigsForTransform(transformId);
- ILaunchConfiguration configToLaunch = null;
- switch(configs.length) {
- case 0:
- IResource resource = chooseResource(shell);
- if(resource != null) {
- configToLaunch = createConfig(transformId, resource);
- }
- break;
- case 1:
- configToLaunch = configs[0];
- break;
- default:
- configToLaunch = chooseExistingConfig(shell, configs);
- break;
- }
- if(configToLaunch != null) {
- boolean doLaunch = true;
- if(showConfigFirst) {
- int dialogResult = DebugUITools.openLaunchConfigurationDialog(shell, configToLaunch,
- IDebugUIConstants.ID_RUN_LAUNCH_GROUP, null);
- doLaunch = dialogResult != Window.CANCEL;
- }
- if(doLaunch) {
- DebugUITools.launch(configToLaunch, mode);
- }
- }
- return configToLaunch != null;
- }
-
- private static IResource chooseResource(Shell shell) {
- IResource resource = null;
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
- shell, new WorkbenchLabelProvider(),
- new WorkbenchContentProvider());
-
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setAllowMultiple(false);
- dialog.setTitle(Messages.JETTransformMainTab_SelectResourceDialogTitle);
- dialog.setMessage(Messages.JETTransformMainTab_SelectResourceDialogTitle);
- dialog.setValidator(new ISelectionStatusValidator() {
- public IStatus validate(Object[] selection) {
- if (selection.length > 0) {
- return new Status(IStatus.OK, Activator.getDefault()
- .getBundle().getSymbolicName(), IStatus.OK,
- "", null); //$NON-NLS-1$
- }
-
- return new Status(IStatus.ERROR, Activator.getDefault()
- .getBundle().getSymbolicName(), IStatus.ERROR, "", null); //$NON-NLS-1$
- }
- });
- if (dialog.open() == ElementTreeSelectionDialog.OK) {
- resource = (IResource) dialog.getFirstResult();
- }
- return resource;
- }
-
- public static boolean findAndLauchForResource(Shell shell, String mode, IResource resource) {
- ILaunchConfiguration[] configs = findConfigsForResource(mode, resource);
- ILaunchConfiguration configToLaunch = null;
- switch(configs.length) {
- case 0:
-// MessageDialog.openError(shell, "Run JET Transform", "No JET transforms found.");
- IJETBundleDescriptor jetBundleDesc = JET2Platform.getProjectDescription(resource.getProject().getName());
- if(jetBundleDesc != null) {
- configToLaunch = createConfig(jetBundleDesc.getId(), resource);
- } else {
- configToLaunch = createConfig("", resource); //$NON-NLS-1$
- if(configToLaunch != null) {
- int dialogResult = DebugUITools.openLaunchConfigurationPropertiesDialog(shell, configToLaunch,
- IDebugUIConstants.ID_RUN_LAUNCH_GROUP, null);
- if(dialogResult == Window.CANCEL) {
- try {
- configToLaunch.delete();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- configToLaunch = null;
- } else {
- configs = findConfigsForResource(mode, resource);
- configToLaunch = configs.length > 0 ? configs[0] : null;
- }
- }
- }
- break;
- case 1:
- configToLaunch = configs[0];
- break;
- default:
- configToLaunch = chooseExistingConfig(shell, configs);
- break;
- }
- if(configToLaunch != null) {
- DebugUITools.launch(configToLaunch, mode);
- }
- return configToLaunch != null;
- }
-
- private static ILaunchConfiguration chooseExistingConfig(Shell shell,
- ILaunchConfiguration[] configs) {
- ILabelProvider labelProvider = new LabelProvider() {
-
- public String getText(Object element) {
- return ((ILaunchConfiguration)element).getName();
- } };
-
- ElementListSelectionDialog dlg = new ElementListSelectionDialog(shell, labelProvider);
- dlg.setElements(configs);
- dlg.setTitle(Messages.LaunchShortcut_DefaultLaunchName);
- dlg.setMessage(Messages.LaunchShortcut_DefaultLaunchName);
- dlg.setMultipleSelection(false);
- int result = dlg.open();
- labelProvider.dispose();
- if (result == Window.OK) {
- return (ILaunchConfiguration) dlg.getFirstResult();
- }
- return null;
- }
-
- public static ILaunchConfiguration[] findConfigsForResource(String mode, IResource resource) {
- final List finds = new ArrayList();
- final ILaunchConfiguration[] configs = getJETLaunchConfigs();
- final IPath fullPath = resource.getFullPath().makeRelative();
- for (int i = 0; i < configs.length; i++) {
- if(fullPath.equals(new Path(getSource(configs[i])).makeRelative())){
- finds.add(configs[i]);
- }
- }
- return (ILaunchConfiguration[]) finds.toArray(new ILaunchConfiguration[finds.size()]);
- }
-
- public static ILaunchConfiguration[] findConfigsForTransformAndResource(String mode, String transformId, IResource resource) {
- final List finds = new ArrayList();
- final ILaunchConfiguration[] configs = getJETLaunchConfigs();
- final String fullPath = resource.getFullPath().toString();
- for (int i = 0; i < configs.length; i++) {
- if(fullPath.equals(getSource(configs[i]))
- && transformId.equals(getTransformID(configs[i]))){
- finds.add(configs[i]);
- }
- }
-
- return (ILaunchConfiguration[]) finds.toArray(new ILaunchConfiguration[finds.size()]);
- }
-
- public static ILaunchConfiguration[] findConfigsForTransform(String transformId) {
- final ILaunchConfiguration[] configs = getJETLaunchConfigs();
- List finds = new ArrayList();
- for (int i = 0; i < configs.length; i++) {
- if(transformId.equals(getTransformID(configs[i]))){
- finds.add(configs[i]);
- }
- }
- return (ILaunchConfiguration[]) finds.toArray(new ILaunchConfiguration[finds.size()]);
- }
-
-
- private static String getSource(ILaunchConfiguration config) {
- try {
- return config.getAttribute(JETLaunchConstants.SOURCE, (String)null);
- } catch (CoreException e) {
- throw convertToRuntimeException(e);
- }
- }
-
- private static String getTransformID(ILaunchConfiguration config) {
- try {
- return config.getAttribute(JETLaunchConstants.ID, (String)null);
- } catch (CoreException e) {
- throw convertToRuntimeException(e);
- }
- }
-
- private static RuntimeException convertToRuntimeException(CoreException e) {
- return new RuntimeException("Unexpected exception", e); //$NON-NLS-1$
- }
-
- private static ILaunchConfiguration[] getJETLaunchConfigs() {
- try {
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- return lm.getLaunchConfigurations(jetLaunchType);
- } catch (CoreException e) {
- throw convertToRuntimeException(e);
- }
- }
-
- private static ILaunchConfigurationType getConfigurationType() {
- ILaunchManager lm= DebugPlugin.getDefault().getLaunchManager();
- return lm.getLaunchConfigurationType(JETLaunchConstants.CONFIG_ID);
- }
-
- public static String generateLaunchName(String id, IResource input, String defaultName)
- {
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- String prefix;
- if (id == null && input == null) {
- prefix = defaultName;
- } else if(input == null) {
- prefix = id;
- } else if(id == null)
- {
- prefix = input.getName();
- } else {
- prefix = id + " (" + input.getName() + ")"; //$NON-NLS-1$//$NON-NLS-2$
- }
-
- return lm.generateUniqueLaunchConfigurationNameFrom(prefix);
- }
-
- public static ILaunchConfiguration[] findAllConfigs() {
- return getJETLaunchConfigs();
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETTransformMainTab.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETTransformMainTab.java
deleted file mode 100644
index 4d38ae7..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/JETTransformMainTab.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.internal.ui.launch;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.internal.runtime.RuntimeLoggerContextExtender;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-import org.eclipse.jet.transform.JETLaunchConstants;
-import org.eclipse.jet.ui.Activator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Main tab for JET Launch Configuraitons
- *
- */
-public class JETTransformMainTab extends AbstractLaunchConfigurationTab {
-
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- // input block controls
- private Text sourceField;
- private Button workspaceLocationButton;
-
- private final Listener fListener = new Listener();;
-
- private Image tabImage;
- private Combo transformCombo;
- private Text transformName;
- private Text transformDescription;
- private Combo logLevelCombo;
- private String[] logLevels;
-
-
- private class Listener extends SelectionAdapter implements ModifyListener
- {
-
- public void widgetSelected(SelectionEvent e) {
- setDirty(true);
- final Object source = e.getSource();
- if(source == transformCombo) {
- handleTransformSelection();
- }
- updateLaunchConfigurationDialog();
- }
- public void modifyText(ModifyEvent e) {
- setDirty(true);
- updateLaunchConfigurationDialog();
- }
- }
-
- /**
- *
- */
- public JETTransformMainTab() {
- super();
- }
-
- private void handleTransformSelection() {
- String id = transformCombo.getText();
- final IJETBundleDescriptor descriptor = JET2Platform.getJETBundleManager().getDescriptor(id);
- transformName.setText(descriptor.getName());
- transformDescription.setText(descriptor.getDescription().trim());
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.verticalSpacing = 15;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createInputBlock(composite);
- createTransformBlock(composite);
- createMessagesBlock(composite);
-
- setControl(composite);
- Dialog.applyDialogFont(composite);
- }
-
- private void createMessagesBlock(Composite composite) {
- Group group = new Group(composite, SWT.NONE);
- group.setText(Messages.JETTransformMainTab_DisplayMessage_Gropu);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createLogLevelsSection(group);
- }
-
- private void createLogLevelsSection(Group parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(Messages.JETTransformMainTab_SeverityLabel);
-
- logLevelCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
- logLevelCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- logLevelCombo.setItems(getLogLevels());
- logLevelCombo.addSelectionListener(fListener);
- }
-
- /**
- * @param composite
- */
- private void createTransformBlock(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setText(Messages.JETTransformMainTab_TransformGroupLabel);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createTransformIdSection(group);
- createTransformNameSection(group);
- createTransformDescriptionSection(group);
- }
-
- private void createTransformDescriptionSection(Group parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(Messages.JETTransformMainTab_DescriptionLabel);
-
- transformDescription = new Text(parent, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = 300;
- gd.heightHint = 40;
- transformDescription.setLayoutData(gd);
- }
-
- private void createTransformNameSection(Group parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(Messages.JETTransformMainTab_NameLabel);
-
- transformName = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = 300;
- transformName.setLayoutData(gd);
-
- }
-
- private void createTransformIdSection(Group parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(Messages.JETTransformMainTab_IdLabel);
-
- transformCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
- transformCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- transformCombo.setItems(JET2Platform.getJETBundleManager().getAllTransformIds());
- transformCombo.addSelectionListener(fListener);
- }
-
- private void createInputBlock(Composite parent)
- {
- Group group = new Group(parent, SWT.NONE);
- group.setText(Messages.JETTransformMainTab_TransformInputGroup);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- sourceField = new Text(group, SWT.BORDER);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- sourceField.setLayoutData(gridData);
- sourceField.addModifyListener(fListener);
- final String accessibleName = group.getText().replaceFirst("(?<!&)&", ""); //$NON-NLS-1$ //$NON-NLS-2$
- sourceField.getAccessible().addAccessibleListener(new AccessibleAdapter() {
-
- public void getName(AccessibleEvent e) {
- e.result = accessibleName;
- }
- });
-
- Composite buttonComposite = new Composite(group, SWT.NONE);
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 3;
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(gridData);
- buttonComposite.setFont(parent.getFont());
-
- workspaceLocationButton= createPushButton(buttonComposite, Messages.JETTransformMainTab_BrowseButtonLabel, null);
- workspaceLocationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
-
- IResource resource = chooseResource(getShell());
- if(resource != null) {
- sourceField.setText(resource.getFullPath().makeRelative().toString());
- }
- }
- });
-
- }
-
- private static IResource chooseResource(Shell shell) {
- IResource resource = null;
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
- shell, new WorkbenchLabelProvider(),
- new WorkbenchContentProvider());
-
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setAllowMultiple(false);
- dialog.setTitle(Messages.JETTransformMainTab_SelectResourceDialogTitle);
- dialog.setMessage(Messages.JETTransformMainTab_SelectResourceDialogTitle);
- dialog.setValidator(new ISelectionStatusValidator() {
- public IStatus validate(Object[] selection) {
- if (selection.length > 0)
- return new Status(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(),
- IStatus.OK, "", null); //$NON-NLS-1$
-
- return new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(),
- IStatus.ERROR, "", null); //$NON-NLS-1$
- }
- });
- if (dialog.open() == ElementTreeSelectionDialog.OK) {
- resource = (IResource) dialog.getFirstResult();
- }
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- public String getName() {
- return Messages.LaunchWizard_MainTab_Name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void initializeFrom(ILaunchConfiguration configuration) {
- try {
- final String id = configuration.getAttribute(JETLaunchConstants.ID, EMPTY_STRING);
- transformCombo.setText(id);
- final IJETBundleDescriptor descriptor = JET2Platform.getJETBundleManager().getDescriptor(id);
- if(descriptor != null)
- {
- transformName.setText(descriptor.getName());
- transformDescription.setText(descriptor.getDescription().trim());
- }
- } catch (CoreException e) {
- transformCombo.setText(EMPTY_STRING);
- }
- try {
- sourceField.setText(configuration.getAttribute(JETLaunchConstants.SOURCE, EMPTY_STRING));
- } catch (CoreException e) {
- sourceField.setText(EMPTY_STRING);
- }
-
- int level;
- try {
- level = configuration.getAttribute(JETLaunchConstants.LOG_FILTER_LEVEL, RuntimeLoggerContextExtender.INFO_LEVEL);
- } catch (CoreException e) {
- level = RuntimeLoggerContextExtender.INFO_LEVEL;
- }
- logLevelCombo.setText(getLogLevelText(level));
- }
-
- private String[] getLogLevels() {
- if (logLevels == null) {
- logLevels = new String[] {
- Messages.JETTransformMainTab_ErrorSeverity,
- Messages.JETTransformMainTab_WarningSeverity,
- Messages.JETTransformMainTab_InformationSeverity,
- Messages.JETTransformMainTab_TraceSeverity,
- Messages.JETTransformMainTab_DebugSeverity,
- };
- }
- return logLevels;
- }
-
- private int getLogLevelFromIndex(int selectionIndex) {
- // list is from highest (5) to lowest (1)
- return getLogLevels().length - selectionIndex;
- }
-
- private String getLogLevelText(int logLevel) {
- // log levels list are from highest (5) to lowest (1)
- return getLogLevels()[getLogLevels().length - logLevel];
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(JETLaunchConstants.ID, transformCombo.getText());
-
- configuration.setAttribute(JETLaunchConstants.SOURCE, sourceField.getText());
-
- configuration.setAttribute(JETLaunchConstants.LOG_FILTER_LEVEL, getLogLevelFromIndex(logLevelCombo.getSelectionIndex()));
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection();
-
- IFile resource = null;
- String id = null;
-
- if(selection instanceof IStructuredSelection) {
- IStructuredSelection iss = (IStructuredSelection) selection;
- Object firstElement = iss.getFirstElement();
- if(firstElement instanceof IFile) {
- resource = (IFile)firstElement;
- } else if (firstElement instanceof IAdaptable) {
- resource = (IFile) ((IAdaptable)firstElement).getAdapter(IFile.class);
- }
- }
- if(resource != null) {
- configuration.setAttribute(JETLaunchConstants.SOURCE,
- resource.getFullPath().makeRelative().toString());
-
- final IProject project = resource.getProject();
- final IJETBundleDescriptor descriptor = JET2Platform.getProjectDescription(project.getName());
- if(descriptor != null) {
- id = descriptor.getId();
- configuration.setAttribute(JETLaunchConstants.ID, id);
-
-
-
- }
- }
- configuration.setAttribute(JETLaunchConstants.LOG_FILTER_LEVEL, RuntimeLoggerContextExtender.INFO_LEVEL);
-
- configuration.rename(LaunchShortcut.generateLaunchName(id, resource));
- }
-
- public Image getImage() {
- if(tabImage == null) {
- ImageDescriptor imageDescriptor = Activator.getImageDescriptor("icons/JET2LaunchIcon.gif"); //$NON-NLS-1$
- tabImage = imageDescriptor.createImage();
- }
- return tabImage;
- }
-
- public void dispose() {
- if(tabImage != null) {
- tabImage.dispose();
- }
- super.dispose();
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/LaunchShortcut.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/LaunchShortcut.java
deleted file mode 100644
index 7c0cd0c..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/launch/LaunchShortcut.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.internal.ui.launch;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.ILaunchShortcut;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Launch shortcut for launching JET transforms on an XML document.
- *
- */
-public class LaunchShortcut implements ILaunchShortcut {
-
- /**
- *
- */
- public LaunchShortcut() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String)
- */
- public void launch(ISelection selection, String mode) {
- // TODO Auto-generated method stub
- if(!(selection instanceof IStructuredSelection)) {
- return;
- }
- IResource resource = (IResource) ((IStructuredSelection)selection).getFirstElement();
- JETLaunchHelper.findAndLauchForResource(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- ILaunchManager.RUN_MODE, resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
- */
- public void launch(IEditorPart editor, String mode) {
- final IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class);
- JETLaunchHelper.findAndLauchForResource(editor.getSite().getShell(), ILaunchManager.RUN_MODE, resource);
-// findAndLaunch(resource, mode);
-
- }
-
- public static String generateLaunchName(String id, IResource input)
- {
- return JETLaunchHelper.generateLaunchName(id, input, Messages.LaunchShortcut_DefaultLaunchName);
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/popup/actions/UnloadAction.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/popup/actions/UnloadAction.java
deleted file mode 100644
index 3215591..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/popup/actions/UnloadAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jet.internal.ui.popup.actions;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jet.internal.InternalJET2Platform;
-import org.eclipse.jet.internal.runtime.JETBundleInstaller;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-
-public class UnloadAction implements IObjectActionDelegate, IActionDelegate {
-
- private String bundleName;
- /**
- * Constructor for Action1.
- */
- public UnloadAction() {
- super();
- }
-
- /**
- * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- Shell shell = new Shell();
- final JETBundleInstaller mgr = InternalJET2Platform.getDefault().getJETBundleInstaller();
- Bundle bundle = Platform.getBundle(bundleName);
- final String DialogTitle = Messages.UnloadAction_DialogTitle;
- if(bundle != null) {
- try {
- mgr.uninstallBundle(bundle);
- MessageDialog.openInformation(
- shell,
- DialogTitle,
- MessageFormat.format(Messages.UnloadAction_UnloadSuccessful, new Object[] {bundleName}));
- } catch (BundleException e) {
- e.printStackTrace();
- MessageDialog.openInformation(
- shell,
- DialogTitle,
- MessageFormat.format(Messages.UnloadAction_UnloadFailed, new Object[] {bundleName, e.toString()}));
- }}
- else {
- MessageDialog.openInformation(
- shell,
- DialogTitle,
- MessageFormat.format(Messages.UnloadAction_NotLoaded, new Object[] {bundleName}));
-
- }
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- IStructuredSelection se = (IStructuredSelection) selection;
-
- final Object firstElement = se.getFirstElement();
- if(firstElement instanceof IProject) {
- IProject project = (IProject) firstElement;
- bundleName = project.getName();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/CompilePreferencePage.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/CompilePreferencePage.java
deleted file mode 100644
index 8e0819c..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/CompilePreferencePage.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- * /
- *******************************************************************************/
-
-package org.eclipse.jet.internal.ui.prefs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.core.compiler.JETCompilerOptions;
-import org.eclipse.jet.core.parser.ast.JETAST;
-import org.eclipse.jet.internal.JETPreferences;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-/**
- * @author pelder
- *
- */
-public class CompilePreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage, IWorkbenchPropertyPage {
-
- private IProject element;
- private StringFieldEditor packageFieldEditor;
- private ExtensionListEditor extFieldEditor;
- private StringFieldEditor srcFolderFieldEditor;
- private StringFieldEditor templatesFolderFieldEditor;
- private BooleanFieldEditor derivedJavaFieldEditor;
- private BooleanFieldEditor projectSpecificSettingsEditor = null;
- private RadioGroupFieldEditor jetVersionFieldEditor;
- private BooleanFieldEditor compileBaseTemplatesFieldEditor = null;
- private StringFieldEditor baseTransformationFieldEditor = null;
- private Composite javaGenerationGroup;
- private Composite v1OptionsGroup;
- private Composite v2OptionsGroup;
- private boolean v1OptionsEnabled;
- private BooleanFieldEditor useJava5FieldEditor;
-
- /**
- * @param style
- */
- public CompilePreferencePage() {
- super(GRID);
-// setDescription(Messages.CompilePreferencePage_Description);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- protected void createFieldEditors() {
-
- // determine whether the page is showing the workspace scope (Windows > Preferences)
- // or in project scope (Project properties)
- final boolean projectSettings = element != null;
- if(projectSettings) {
- setPreferenceStore(new ScopedPreferenceStore(new ProjectScope(element), JET2Platform.PLUGIN_ID));
- } else {
- setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(), JET2Platform.PLUGIN_ID));
- }
-
- if(projectSettings) {
- // add a check box to use project specific settings
- projectSpecificSettingsEditor = new BooleanFieldEditor(JETPreferences.PROJECT_SPECIFIC_SETTINGS,
- Messages.CompilePreferencePage_EnableProjectSettings, getFieldEditorParent());
- addField(projectSpecificSettingsEditor);
- Label horizontalLine= new Label(getFieldEditorParent(), SWT.SEPARATOR | SWT.HORIZONTAL);
- horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
- horizontalLine.setFont(getFieldEditorParent().getFont());
- }
-
- // create "global" option editors...
- jetVersionFieldEditor = new RadioGroupFieldEditor(JETCompilerOptions.OPTION_JET_SPECIFICATION_VERSION, Messages.CompilePreferencePage_JETComformanceGroupLabel, 1,
- new String[][] {
- {Messages.CompilePreferencePage_JET1_OPTION, String.valueOf(JETAST.JET_SPEC_V1)},
- {Messages.CompilePreferencePage_JET2_Option, String.valueOf(JETAST.JET_SPEC_V2)},
- },
- getFieldEditorParent(), true);
- addField(jetVersionFieldEditor);
-
- v1OptionsEnabled = getPreferenceStore().getInt(JETCompilerOptions.OPTION_JET_SPECIFICATION_VERSION) == JETAST.JET_SPEC_V1;
-
-
-
- // common generation group
- javaGenerationGroup = createGroup(Messages.CompilePreferencePage_JavaGenerationGroupLabel);
-
- srcFolderFieldEditor = new StringFieldEditor(JETCompilerOptions.OPTION_COMPILED_TEMPLATE_SRC_DIR,
- Messages.CompilePreferencePage_SourceFolder, javaGenerationGroup);
- addField(srcFolderFieldEditor);
-
- derivedJavaFieldEditor = new BooleanFieldEditor(JETCompilerOptions.OPTION_SET_JAVA_FILES_AS_DERIVED,
- Messages.CompilePreferencePage_DeriveJavaFiles, javaGenerationGroup);
- addField(derivedJavaFieldEditor);
-
- useJava5FieldEditor = new BooleanFieldEditor(JETCompilerOptions.OPTION_USE_JAVA5, Messages.CompilePreferencePage_use_java5, javaGenerationGroup);
- addField(useJava5FieldEditor);
-
- // v1 options group
- v1OptionsGroup = createGroup(Messages.CompilePreferencePage_JET1OptionsGroupLabel);
- templatesFolderFieldEditor = new StringFieldEditor(JETCompilerOptions.OPTION_V1_TEMPLATES_DIR,
- Messages.CompilePreferencePage_TemplatesDirLabel, v1OptionsGroup);
- addField(templatesFolderFieldEditor);
- if(projectSettings) {
- baseTransformationFieldEditor = new StringFieldEditor(JETCompilerOptions.OPTION_V1_BASE_TRANSFORMATION,
- Messages.CompilePreferencePage_BaseLocationsLabel,
- StringFieldEditor.UNLIMITED,
- StringFieldEditor.VALIDATE_ON_KEY_STROKE,
- v1OptionsGroup) {
- protected boolean doCheckState() {
- String trimmedValue = getStringValue().trim();
- return trimmedValue.length() == 0 || isValidURIList(trimmedValue);
- }
-
- };
- baseTransformationFieldEditor.setErrorMessage(Messages.CompilePreferencePage_InvalidBaseLocations);
- addField(baseTransformationFieldEditor);
-
- compileBaseTemplatesFieldEditor = new BooleanFieldEditor(JETCompilerOptions.OPTION_V1_COMPILE_BASE_TEMPLATES, Messages.CompilePreferencePage_CompileBaseTemplates, v1OptionsGroup);
- addField(compileBaseTemplatesFieldEditor);
-
- }
-
- // v2 options group
- v2OptionsGroup = createGroup(Messages.CompilePreferencePage_JET2_OPTIONS_GROUP_LABEL);
-
- extFieldEditor = new ExtensionListEditor(JETCompilerOptions.OPTION_TEMPLATE_EXT,
- Messages.CompilePreferencePage_FileExtensions, v2OptionsGroup);
- addField(extFieldEditor);
-
- packageFieldEditor = new StringFieldEditor(JETCompilerOptions.OPTION_COMPILED_TEMPLATE_PACKAGE,
- Messages.CompilePreferencePage_JavaPackage, v2OptionsGroup);
- addField(packageFieldEditor);
-
-
-
- }
-
- private boolean isValidURIList(String uriList) {
- String[] uriStrings = uriList.split(","); //$NON-NLS-1$
- boolean ok = true;
- for (int i = 0; i < uriStrings.length; i++) {
- try {
- new URI(uriStrings[i]);
- } catch (URISyntaxException e) {
- ok = false;
- }
- }
- return ok;
- }
-
- /**
- * @param groupTitle
- * @return
- */
- private Composite createGroup(final String groupTitle) {
-
- final Group group = new Group(getFieldEditorParent(), SWT.NONE);
- group.setFont(getFieldEditorParent().getFont());
- group.setText(groupTitle);
- group.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
- setGroupLayout(group, 2);
-
- return group;
- }
-
- /**
- * @param group
- * @param numColumns TODO
- */
- private void setGroupLayout(final Composite group, int numColumns) {
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- group.setLayout(layout);
- }
-
- /**
- *
- */
- private void updateControlEnablement() {
- final boolean projectSettings = projectSpecificSettingsEditor != null;
- // enable "global" options
- boolean enabledGlobalSettings = !projectSettings || projectSpecificSettingsEditor.getBooleanValue();
- jetVersionFieldEditor.setEnabled(enabledGlobalSettings, getFieldEditorParent());
- srcFolderFieldEditor.setEnabled(enabledGlobalSettings, javaGenerationGroup);
- derivedJavaFieldEditor.setEnabled(enabledGlobalSettings, javaGenerationGroup);
- useJava5FieldEditor.setEnabled(enabledGlobalSettings, javaGenerationGroup);
- if(!enabledGlobalSettings) {
- srcFolderFieldEditor.loadDefault();
- derivedJavaFieldEditor.loadDefault();
- jetVersionFieldEditor.loadDefault();
- useJava5FieldEditor.loadDefault();
- }
-
- // Enable JET1 options
- if(projectSettings) {
- boolean enableV1Options = v1OptionsEnabled && enabledGlobalSettings;
- baseTransformationFieldEditor.setEnabled(enableV1Options, v1OptionsGroup);
- compileBaseTemplatesFieldEditor.setEnabled(enableV1Options, v1OptionsGroup);
- templatesFolderFieldEditor.setEnabled(enableV1Options, v1OptionsGroup);
- if(!enableV1Options) {
- baseTransformationFieldEditor.loadDefault();
- compileBaseTemplatesFieldEditor.loadDefault();
- templatesFolderFieldEditor.loadDefault();
- }
- }
-
- // Enable JET2 options
- if(projectSettings) {
- boolean enableV2Options = !v1OptionsEnabled && enabledGlobalSettings;
- extFieldEditor.setEnabled(enableV2Options, v2OptionsGroup);
- packageFieldEditor.setEnabled(enableV2Options, v2OptionsGroup);
- if(!enableV2Options) {
- extFieldEditor.loadDefault();
- packageFieldEditor.loadDefault();
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- public IAdaptable getElement() {
- return element;
- }
-
- public void setElement(IAdaptable element) {
- this.element = (IProject)element;
- }
-
- protected void initialize() {
- super.initialize();
- if(projectSpecificSettingsEditor != null)
- {
- updateControlEnablement();
- }
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- super.propertyChange(event);
- if(event.getSource() == projectSpecificSettingsEditor && FieldEditor.VALUE.equals(event.getProperty())) {
- updateControlEnablement();
- } else if(event.getSource() == jetVersionFieldEditor && FieldEditor.VALUE.equals(event.getProperty())) {
- v1OptionsEnabled = String.valueOf(JETAST.JET_SPEC_V1).equals(event.getNewValue());
- updateControlEnablement();
- }
- }
-
- protected void performDefaults() {
- super.performDefaults();
- if (projectSpecificSettingsEditor != null) {
- updateControlEnablement();
- }
-
- }
-
- public boolean performOk() {
- final boolean ok = super.performOk();
- if(ok) {
- try {
- if(element != null)
- {
- element.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
- }
- else
- {
- ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
- }
- } catch (CoreException e) {
- // build failed, we don't care
- }
- }
- return ok;
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/ExtensionListEditor.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/ExtensionListEditor.java
deleted file mode 100644
index 2130113..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/ExtensionListEditor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.internal.ui.prefs;
-
-import java.util.regex.Pattern;
-
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.preference.ListEditor;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * @author pelder
- *
- */
-public class ExtensionListEditor extends ListEditor {
-
- /**
- *
- */
- public ExtensionListEditor(String name, String labelText, Composite parent) {
- init(name, labelText);
- createControl(parent);
- }
-
- protected String createList(String[] items) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < items.length; i++) {
- if(i != 0)
- {
- buffer.append(","); //$NON-NLS-1$
- }
- buffer.append(items[i]);
- }
- return buffer.toString();
- }
-
- protected String getNewInputObject() {
- InputDialog dialog = new InputDialog(getShell(), Messages.ExtensionListEditor_AddDialogTitle, Messages.ExtensionListEditor_AddDialogPrompt, "", new IInputValidator() { //$NON-NLS-1$
-
- public String isValid(String newText) {
- return !Pattern.matches("(\\p{L}|\\d)+", newText) ? //$NON-NLS-1$
- Messages.ExtensionListEditor_AddDialogErrorMsg : null;
- }});
- final int result = dialog.open();
- return result == InputDialog.OK ? dialog.getValue() : null;
- }
-
- protected String[] parseString(String stringList) {
- return stringList.split(","); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/JETPreferencePage.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/JETPreferencePage.java
deleted file mode 100644
index bf47b66..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/internal/ui/prefs/JETPreferencePage.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- * /
- *******************************************************************************/
-
-package org.eclipse.jet.internal.ui.prefs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.internal.JETPreferences;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.PathEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-/**
- * @author pelder
- *
- */
-public class JETPreferencePage extends FieldEditorPreferencePage implements
- IWorkbenchPreferencePage, IWorkbenchPropertyPage {
-
- private IAdaptable element;
-
- /**
- * @param style
- */
- public JETPreferencePage() {
- super(GRID);
-
-// setDescription(Messages.JETPreferencePage_Description);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- protected void createFieldEditors() {
- if(element != null)
- {
- setPreferenceStore(new ScopedPreferenceStore(new ProjectScope((IProject)element), JET2Platform.PLUGIN_ID));
- }
- else {
- setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(), JET2Platform.PLUGIN_ID));
- }
- addField(new PathEditor(JETPreferences.ADDITIONAL_TEMPLATE_JAR_LOCATIONS,
- Messages.JETPreferencePage_LocationsLabel,
- Messages.JETPreferencePage_LocationsAddDialogTitle,
- getFieldEditorParent()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- // TODO Auto-generated method stub
-
- }
-
- public IAdaptable getElement() {
- return element;
- }
-
- public void setElement(IAdaptable element) {
- this.element = element;
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/Activator.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/Activator.java
deleted file mode 100644
index 0799b47..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/Activator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jet.ui;
-
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
- private IPreferenceStore preferenceStore;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(getDefault()
- .getBundle().getSymbolicName(), path);
- }
-
- /**
- * Return the prefence store shared by ui and core plugins.
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- preferenceStore = new ScopedPreferenceStore(new InstanceScope(),JET2Platform.PLUGIN_ID);
-
- }
- return preferenceStore;
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/Messages.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/Messages.java
deleted file mode 100644
index 890484c..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/Messages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * /
- *******************************************************************************/
-package org.eclipse.jet.ui.newproject;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jet.ui.newproject.messages"; //$NON-NLS-1$
- public static String NewJETProjectPage2_description;
- public static String NewJETProjectPage2_InvalidID;
- public static String NewJETProjectPage2_title;
- public static String NewJETProjectPage2Controls__groupgrpTransProps_text;
- public static String NewJETProjectPage2Controls__labellblID_text;
- public static String NewJETProjectPage2Controls__labellblName_text;
- public static String NewJETProjectPage2Controls__labellblDescription_text;
- public static String NewJETProjectPage2Controls__labellblTemplateLoader_text;
- public static String NewJETProjectPage2Controls_grpExtensions_text;
- public static String NewJETProjectPage2Controls_cbxExtends_text;
- public static String NewJETProjectPage2Controls_lblBaseTx_text;
- public static String NewJETProjectPage1Controls__groupgProjSet_text;
- public static String NewJETProjectPage1Controls__labellblTemplateFolder_text;
- public static String NewJETProjectPage1Controls__labellblJETOutput_text;
- public static String NewJETProjectPage1Controls__labellblJavaOutput_text;
- public static String NewJETProjectPage1Controls__labellblDefJavaPackage_text;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1.java
deleted file mode 100644
index c9aa50f..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1.java
+++ /dev/null
@@ -1,139 +0,0 @@
-
-package org.eclipse.jet.ui.newproject;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.JavaConventions;
-import org.eclipse.jet.core.compiler.JETCompilerOptions;
-import org.eclipse.jet.ui.Activator;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-public class NewJETProjectPage1 extends NewJETProjectPage1Controls {
-
-
- private String lastBaseID = null;
-
- public NewJETProjectPage1(String pageName) {
- super(pageName);
- }
-
- public void createControl(Composite parent) {
- // super.createControl guarantees all controls are created.
- super.createControl(parent);
-
- // initialize control data
- final IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
-
- txtTemplateFolder.setText("templates"); //$NON-NLS-1$
- txtJETOutput.setText(preferenceStore.getDefaultString(JETCompilerOptions.OPTION_COMPILED_TEMPLATE_SRC_DIR));
- txtJavaOutput.setText(preferenceStore.getDefaultString(JETCompilerOptions.OPTION_JAVA_OUTPUT_FOLDER));
- txtDefJavaPackage.setText(preferenceStore.getDefaultString(JETCompilerOptions.OPTION_COMPILED_TEMPLATE_PACKAGE));
-
- }
-
- protected void txtTemplateFolder_modify(ModifyEvent e) {
- validatePage();
- }
-
- protected void txtJETOutput_modify(ModifyEvent e) {
- validatePage();
- }
-
- protected void txtJavaOutput_modify(ModifyEvent e) {
- validatePage();
- }
-
- protected void txtDefJavaPackage_modify(ModifyEvent e) {
- validatePage();
- }
-
- protected boolean validatePage() {
- final boolean parentValid = super.validatePage();
- if(!parentValid) {
- return false;
- }
-
- final String id = getBaseID();
- if(!id.equals(lastBaseID)) {
- lastBaseID = id;
- final String newDefPackage = id + ".compiled"; //$NON-NLS-1$
- txtDefJavaPackage.setText(newDefPackage);
- }
-
- if(!validateFolder(txtTemplateFolder)) {
- return false;
- }
- if(!validateFolder(txtJavaOutput)) {
- return false;
- }
- if(!validateFolder(txtJETOutput)) {
- return false;
- }
- final String defaultJavaPackage = getDefaultJavaPackage();
- final IStatus status = validateJavaPackage(defaultJavaPackage);
- if(!status.isOK()) {
- setErrorMessage(status.getMessage());
- return false;
- }
- return true;
- }
-
- /**
- * @param defaultJavaPackage
- * @return
- */
- private IStatus validateJavaPackage(final String defaultJavaPackage) {
- IStatus status = JavaConventions.validatePackageName(defaultJavaPackage);
- return status;
- }
-
- /**
- * @param folderField
- */
- private boolean validateFolder(final Text folderField) {
- final IWorkspace workspace = ResourcesPlugin.getWorkspace();
- final IStatus status = workspace.validatePath("/" + getProjectName() + "/" + folderField.getText().trim(), IResource.FOLDER); //$NON-NLS-1$ //$NON-NLS-2$
- if(!status.isOK()) {
- setErrorMessage(status.getMessage());
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * @return
- */
- String getBaseID() {
- final String projectName = getProjectName();
-
- final String id = projectName.replaceAll("[^a-zA-Z0-9\\._]", "_"); //$NON-NLS-1$//$NON-NLS-2$
- return id;
- }
-
- public String getDefJavaPackage() {
- return txtDefJavaPackage.getText();
- }
-
- public String getTemplateFolder() {
- return txtTemplateFolder.getText().trim();
- }
-
- public String getJETOutputFolder() {
- return txtJETOutput.getText().trim();
- }
-
- public String getJavaOutputFolder() {
- return txtJavaOutput.getText().trim();
- }
-
- public String getDefaultJavaPackage() {
- return txtDefJavaPackage.getText().trim();
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1Controls.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1Controls.java
deleted file mode 100644
index 95abe98..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage1Controls.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.jet.ui.newproject;
-
-import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public abstract class NewJETProjectPage1Controls
- extends WizardNewProjectCreationPage {
-
- protected Text txtTemplateFolder;
- protected Text txtJETOutput;
- protected Text txtJavaOutput;
- protected Text txtDefJavaPackage;
-
-
- protected NewJETProjectPage1Controls(String pageName) {
- super(pageName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- // retarget parent to the control composite established by the base class
- parent = (Composite)getControl();
- initializeDialogUnits(parent);
-
- // working variables for creating grid layout info
- GridLayout _gl;
- GridData _gd;
-
- Group _groupgProjSet;
- _groupgProjSet = new Group(parent, SWT.NONE);
- _groupgProjSet.setText(Messages.NewJETProjectPage1Controls__groupgProjSet_text);
- _groupgProjSet.setFont(parent.getFont());
- org.eclipse.ui.PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), "org.eclipse.jet.ui.trjt0010"); //$NON-NLS-1$
-
-
- // layout _groupgProjSet within parent
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- _groupgProjSet.setLayoutData(_gd);
-
- // Initialize _groupgProjSet layout
- _gl = new GridLayout();
- _gl.numColumns = 2;
- _groupgProjSet.setLayout(_gl);
-
- Label _labellblTemplateFolder;
- _labellblTemplateFolder = new Label(_groupgProjSet, SWT.NONE);
- _labellblTemplateFolder.setText(Messages.NewJETProjectPage1Controls__labellblTemplateFolder_text);
- _labellblTemplateFolder.setFont(_groupgProjSet.getFont());
-
-
-
- txtTemplateFolder = new Text(_groupgProjSet, SWT.BORDER);
- txtTemplateFolder.setFont(_groupgProjSet.getFont());
-
-
- // layout txtTemplateFolder within _groupgProjSet
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtTemplateFolder.setLayoutData(_gd);
- // register event handlers for txtTemplateFolder
- txtTemplateFolder.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtTemplateFolder_modify(e);
- }});
-
- Label _labellblJETOutput;
- _labellblJETOutput = new Label(_groupgProjSet, SWT.NONE);
- _labellblJETOutput.setText(Messages.NewJETProjectPage1Controls__labellblJETOutput_text);
- _labellblJETOutput.setFont(_groupgProjSet.getFont());
-
-
-
- txtJETOutput = new Text(_groupgProjSet, SWT.BORDER);
- txtJETOutput.setFont(_groupgProjSet.getFont());
-
-
- // layout txtJETOutput within _groupgProjSet
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtJETOutput.setLayoutData(_gd);
- // register event handlers for txtJETOutput
- txtJETOutput.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtJETOutput_modify(e);
- }});
-
- Label _labellblJavaOutput;
- _labellblJavaOutput = new Label(_groupgProjSet, SWT.NONE);
- _labellblJavaOutput.setText(Messages.NewJETProjectPage1Controls__labellblJavaOutput_text);
- _labellblJavaOutput.setFont(_groupgProjSet.getFont());
-
-
-
- txtJavaOutput = new Text(_groupgProjSet, SWT.BORDER);
- txtJavaOutput.setFont(_groupgProjSet.getFont());
-
-
- // layout txtJavaOutput within _groupgProjSet
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtJavaOutput.setLayoutData(_gd);
- // register event handlers for txtJavaOutput
- txtJavaOutput.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtJavaOutput_modify(e);
- }});
-
- Label _labellblDefJavaPackage;
- _labellblDefJavaPackage = new Label(_groupgProjSet, SWT.NONE);
- _labellblDefJavaPackage.setText(Messages.NewJETProjectPage1Controls__labellblDefJavaPackage_text);
- _labellblDefJavaPackage.setFont(_groupgProjSet.getFont());
-
-
-
- txtDefJavaPackage = new Text(_groupgProjSet, SWT.BORDER);
- txtDefJavaPackage.setFont(_groupgProjSet.getFont());
-
-
- // layout txtDefJavaPackage within _groupgProjSet
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtDefJavaPackage.setLayoutData(_gd);
- // register event handlers for txtDefJavaPackage
- txtDefJavaPackage.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtDefJavaPackage_modify(e);
- }});
-
-
- }
-
-
- /**
- * Modify event handler for {@link #txtTemplateFolder}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtTemplateFolder_modify(ModifyEvent e);
-
- /**
- * Modify event handler for {@link #txtJETOutput}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtJETOutput_modify(ModifyEvent e);
-
- /**
- * Modify event handler for {@link #txtJavaOutput}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtJavaOutput_modify(ModifyEvent e);
-
- /**
- * Modify event handler for {@link #txtDefJavaPackage}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtDefJavaPackage_modify(ModifyEvent e);
-
-
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2.java
deleted file mode 100644
index d44983b..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * /
- *******************************************************************************/
-
-package org.eclipse.jet.ui.newproject;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.JavaConventions;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-
-public class NewJETProjectPage2 extends NewJETProjectPage2Controls {
-
-
- private NewJETProjectPage1 page1;
- private boolean showExtensionsGroup;
-
-
- public NewJETProjectPage2(String pageName) {
- super(pageName);
- setTitle(Messages.NewJETProjectPage2_title);
- setDescription(Messages.NewJETProjectPage2_description);
- }
-
- public void createControl(Composite parent) {
- // super.createControl guarantees all controls are created.
- super.createControl(parent);
-
- // initialize control data
- setExtends(false);
-
- final String[] allIDs = JET2Platform.getJETBundleManager().getAllTransformIds();
- for (int i = 0; i < allIDs.length; i++) {
- ddlBaseTx.add(allIDs[i]);
- }
-
- if(!showExtensionsGroup) {
- final boolean visible = false;
- grpExtensions.setVisible(visible);
- ddlBaseTx.setVisible(visible);
- cbxExtends.setVisible(visible);
- lblBaseTx.setVisible(visible);
- }
-
- setPageComplete(validatePage());
- }
-
- private boolean validatePage() {
- if(!validateTranformID()) {
- return false;
- }
- if(!validateTemplateLoader()) {
- return false;
- }
- if(cbxExtends.getSelection() && cbxExtends.isVisible() && ddlBaseTx.getText().trim().length() == 0) {
- return false;
- }
-
- setMessage(null);
- setErrorMessage(null);
- return true;
- }
-
- private boolean validateTemplateLoader() {
- final IStatus status = JavaConventions.validateJavaTypeName(getTemplateLoader());
- if(status.getSeverity() == IStatus.ERROR) {
- setErrorMessage(status.getMessage());
- return false;
- }
- return true;
- }
-
- private boolean validateTranformID() {
- final String transformID = getTransformID();
- if(!transformID.matches("[a-zA-Z0-9\\._]*")) { //$NON-NLS-1$
- setErrorMessage(Messages.NewJETProjectPage2_InvalidID);
- return false;
- }
- return true;
- }
-
- protected void txtID_modify(ModifyEvent e) {
- setPageComplete(validatePage());
- }
-
- protected void txtTemplateLoader_modify(ModifyEvent e) {
- setPageComplete(validatePage());
- }
-
- private void setExtends(boolean setExtends) {
- if(setExtends != cbxExtends.getSelection()) {
- cbxExtends.setSelection(setExtends);
- }
- lblBaseTx.setEnabled(setExtends);
- ddlBaseTx.setEnabled(setExtends);
-
- }
-
- public void setJETProjectPage1(NewJETProjectPage1 page1) {
- this.page1 = page1;
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.jet.ui.newproject.NewJETProjectPage2Controls#cbxExtends_selection(org.eclipse.swt.events.SelectionEvent)
- */
- protected void cbxExtends_selection(SelectionEvent e) {
- final boolean selected = cbxExtends.getSelection();
- setExtends(selected);
- if(selected) {
- ddlBaseTx.setFocus();
- }
- setPageComplete(validatePage());
- getContainer().updateButtons();
- }
-
-
- protected void ddlBaseTx_modify(ModifyEvent e) {
- setPageComplete(validatePage());
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if(visible && page1 != null) {
- txtTemplateLoader.setText(page1.getDefJavaPackage() + "._jet_transformation"); //$NON-NLS-1$
- txtID.setText(page1.getBaseID());
- txtName.setText(page1.getBaseID());
- txtID.setFocus();
- }
- }
-
- public boolean isExtension() {
- return cbxExtends.getSelection();
- }
-
- public String getTransformID() {
- return txtID.getText().trim();
- }
-
- public String getTransformName() {
- return txtName.getText().trim();
- }
-
- public String getTransformDescription() {
- return txtDescription.getText().trim();
- }
-
- public String getTemplateLoader() {
- return txtTemplateLoader.getText().trim();
- }
-
- public String getBaseTransformID() {
- return ddlBaseTx.getText().trim();
- }
-
- void showExtensionsGroup(boolean show) {
- this.showExtensionsGroup = show;
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2Controls.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2Controls.java
deleted file mode 100644
index 5e25d74..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewJETProjectPage2Controls.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * /
- *******************************************************************************/
-package org.eclipse.jet.ui.newproject;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public abstract class NewJETProjectPage2Controls
- extends WizardPage {
-
- protected Text txtID;
- protected Text txtName;
- protected Text txtDescription;
- protected Text txtTemplateLoader;
- protected Group grpExtensions;
- protected Button cbxExtends;
- protected Label lblBaseTx;
- protected Combo ddlBaseTx;
-
-
- protected NewJETProjectPage2Controls(String pageName) {
- super(pageName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- // working variables for creating grid layout info
- GridLayout _gl;
- GridData _gd;
-
- Composite _compositetop;
- _compositetop = new Composite(parent, SWT.NULL);
- _compositetop.setFont(parent.getFont());
- setControl(_compositetop);
- org.eclipse.ui.PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), "org.eclipse.jet.ui.trjt0020"); //$NON-NLS-1$
-
-
- // layout _compositetop within parent
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- _gd.verticalAlignment = GridData.FILL;
- _gd.grabExcessVerticalSpace = true;
- _compositetop.setLayoutData(_gd);
-
- // Initialize _compositetop layout
- _gl = new GridLayout();
- _gl.numColumns = 1;
- _compositetop.setLayout(_gl);
-
- Group _groupgrpTransProps;
- _groupgrpTransProps = new Group(_compositetop, SWT.NONE);
- _groupgrpTransProps.setText(Messages.NewJETProjectPage2Controls__groupgrpTransProps_text);
- _groupgrpTransProps.setFont(_compositetop.getFont());
-
-
- // layout _groupgrpTransProps within _compositetop
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- _groupgrpTransProps.setLayoutData(_gd);
-
- // Initialize _groupgrpTransProps layout
- _gl = new GridLayout();
- _gl.numColumns = 2;
- _groupgrpTransProps.setLayout(_gl);
-
- Label _labellblID;
- _labellblID = new Label(_groupgrpTransProps, SWT.NONE);
- _labellblID.setText(Messages.NewJETProjectPage2Controls__labellblID_text);
- _labellblID.setFont(_groupgrpTransProps.getFont());
-
-
-
- txtID = new Text(_groupgrpTransProps, SWT.BORDER);
- txtID.setFont(_groupgrpTransProps.getFont());
-
-
- // layout txtID within _groupgrpTransProps
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtID.setLayoutData(_gd);
- // register event handlers for txtID
- txtID.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtID_modify(e);
- }});
-
- Label _labellblName;
- _labellblName = new Label(_groupgrpTransProps, SWT.NONE);
- _labellblName.setText(Messages.NewJETProjectPage2Controls__labellblName_text);
- _labellblName.setFont(_groupgrpTransProps.getFont());
-
-
-
- txtName = new Text(_groupgrpTransProps, SWT.BORDER);
- txtName.setFont(_groupgrpTransProps.getFont());
-
-
- // layout txtName within _groupgrpTransProps
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtName.setLayoutData(_gd);
-
- Label _labellblDescription;
- _labellblDescription = new Label(_groupgrpTransProps, SWT.NONE);
- _labellblDescription.setText(Messages.NewJETProjectPage2Controls__labellblDescription_text);
- _labellblDescription.setFont(_groupgrpTransProps.getFont());
-
-
-
- txtDescription = new Text(_groupgrpTransProps, SWT.BORDER);
- txtDescription.setFont(_groupgrpTransProps.getFont());
-
-
- // layout txtDescription within _groupgrpTransProps
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtDescription.setLayoutData(_gd);
-
- Label _labellblTemplateLoader;
- _labellblTemplateLoader = new Label(_groupgrpTransProps, SWT.NONE);
- _labellblTemplateLoader.setText(Messages.NewJETProjectPage2Controls__labellblTemplateLoader_text);
- _labellblTemplateLoader.setFont(_groupgrpTransProps.getFont());
-
-
-
- txtTemplateLoader = new Text(_groupgrpTransProps, SWT.BORDER);
- txtTemplateLoader.setFont(_groupgrpTransProps.getFont());
-
-
- // layout txtTemplateLoader within _groupgrpTransProps
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- txtTemplateLoader.setLayoutData(_gd);
- // register event handlers for txtTemplateLoader
- txtTemplateLoader.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- txtTemplateLoader_modify(e);
- }});
-
- grpExtensions = new Group(_compositetop, SWT.NONE);
- grpExtensions.setText(Messages.NewJETProjectPage2Controls_grpExtensions_text);
- grpExtensions.setFont(_compositetop.getFont());
-
-
- // layout grpExtensions within _compositetop
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- grpExtensions.setLayoutData(_gd);
-
- // Initialize grpExtensions layout
- _gl = new GridLayout();
- _gl.numColumns = 2;
- grpExtensions.setLayout(_gl);
-
- cbxExtends = new Button(grpExtensions, SWT.CHECK | SWT.RIGHT);
- cbxExtends.setText(Messages.NewJETProjectPage2Controls_cbxExtends_text);
-
- cbxExtends.setFont(grpExtensions.getFont());
-
-
- // layout cbxExtends within grpExtensions
- _gd = new GridData();
- _gd.horizontalSpan = 2;
- cbxExtends.setLayoutData(_gd);
- // register event handlers for cbxExtends
- cbxExtends.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- cbxExtends_selection(e);
- }
- });
-
- lblBaseTx = new Label(grpExtensions, SWT.NONE);
- lblBaseTx.setText(Messages.NewJETProjectPage2Controls_lblBaseTx_text);
- lblBaseTx.setFont(grpExtensions.getFont());
-
-
- // layout lblBaseTx within grpExtensions
- _gd = new GridData();
- _gd.horizontalIndent = convertWidthInCharsToPixels(4);
- lblBaseTx.setLayoutData(_gd);
-
- ddlBaseTx = new Combo(grpExtensions, SWT.RIGHT
- | SWT.DROP_DOWN
- | SWT.READ_ONLY
- );
- ddlBaseTx.setFont(grpExtensions.getFont());
-
-
- // layout ddlBaseTx within grpExtensions
- _gd = new GridData();
- _gd.horizontalAlignment = GridData.FILL;
- _gd.grabExcessHorizontalSpace = true;
- ddlBaseTx.setLayoutData(_gd);
- // register event handlers for ddlBaseTx
- ddlBaseTx.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- ddlBaseTx_modify(e);
- }});
-
-
- }
-
-
- /**
- * Modify event handler for {@link #txtID}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtID_modify(ModifyEvent e);
-
- /**
- * Modify event handler for {@link #txtTemplateLoader}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void txtTemplateLoader_modify(ModifyEvent e);
-
- /**
- * Selection event handler for {@link #cbxExtends}.
- * @param e an event containing information on the selection
- * @see SelectionListener
- * @see SelectionListener#widgetSelected(SelectionEvent)
- */
- protected abstract void cbxExtends_selection(SelectionEvent e);
-
- /**
- * Modify event handler for {@link #ddlBaseTx}.
- *
- * @param e the Modify Event
- * @see ModifyListener
- * @see ModifyListener#modifyText(ModifyEvent)
- */
- protected abstract void ddlBaseTx_modify(ModifyEvent e);
-
-
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectInfo.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectInfo.java
deleted file mode 100644
index c3b28e8..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectInfo.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006, 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- */
-
-package org.eclipse.jet.ui.newproject;
-
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Represents information required to create a new JET2 Project
- *
- */
-public final class NewProjectInfo {
-
- private String projectName;
- private Map otherInfo = null;
- private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
- private static final String INDENT = " "; //$NON-NLS-1$
- private final Map projectAttributes = new LinkedHashMap();
-
- public NewProjectInfo() {
- // nothing to do
- }
- /**
- * Return the currently set project Name.
- * @return the projectName or <code>null</code>
- */
- public final String getProjectName() {
- return projectName;
- }
-
- /**
- * Set the projectName.
- * @param projectName the projectName to set
- */
- public final void setProjectName(String projectName) {
- this.projectName = projectName;
- setProjectAttribute("name", projectName); //$NON-NLS-1$
- }
-
- public String toXmlString() {
- if(projectName == null) {
- throw new IllegalStateException("projectName not set"); //$NON-NLS-1$
- }
- StringBuffer xml = new StringBuffer();
- xml.append("<newProjectModel>").append(NL); //$NON-NLS-1$
- xml.append(INDENT).append("<project"); //$NON-NLS-1$
- for (Iterator i = projectAttributes.entrySet().iterator(); i.hasNext();) {
- Map.Entry entry = (Map.Entry) i.next();
- addAttribute(xml, (String)entry.getKey(), (String)entry.getValue());
- }
-// addAttribute(xml, "name", projectName); //$NON-NLS-1$
-// addAttribute(xml, "location", location); //$NON-NLS-1$
- xml.append("/>").append(NL); //$NON-NLS-1$
- if(otherInfo != null) {
- for (Iterator i = otherInfo.values().iterator(); i.hasNext();) {
- String otherElement = (String) i.next();
- xml.append(INDENT).append(otherElement).append(NL);
- }
- }
- xml.append("</newProjectModel>").append(NL); //$NON-NLS-1$
- return xml.toString();
- }
- /**
- * @param xml
- * @param name
- * @param value
- */
- private void addAttribute(StringBuffer xml, String name, final String value) {
- if(value != null) {
- xml.append(' ').append(name).append("=\"").append(value).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-
- public void setOtherInfo(String key, String xmlContent) {
- if(otherInfo == null) {
- otherInfo = new LinkedHashMap();
- }
- if(xmlContent != null) {
- otherInfo.put(key, xmlContent);
- } else {
- otherInfo.remove(key);
- }
-
- }
- public void setLocation(String location) {
- setProjectAttribute("location", location); //$NON-NLS-1$
- }
-
- public void setProjectAttribute(String attributeName, String value) {
- projectAttributes.put(attributeName, value);
- }
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java
deleted file mode 100644
index 5b83af1..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/NewProjectWizard.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id$
- * /
- *******************************************************************************/
-
-package org.eclipse.jet.ui.newproject;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
-import org.eclipse.jet.JET2Platform;
-import org.eclipse.jet.internal.InternalJET2Platform;
-import org.eclipse.jet.internal.ui.l10n.Messages;
-import org.eclipse.jet.transform.IJETBundleDescriptor;
-import org.eclipse.jet.ui.Activator;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * Implement New Project Wizard for JET2 transforms.
- *
- */
-public class NewProjectWizard extends Wizard implements INewWizard {
-
- private static final String NEW_PROJECT_WIZARD_TX_ID = "org.eclipse.jet.transforms.newproject"; //$NON-NLS-1$
- private NewJETProjectPage1 projectPage;
-
- protected final NewProjectInfo newProjectInfo = new NewProjectInfo();
- private NewJETProjectPage2 projectPropertiesPage;
-
- /**
- *
- */
- public NewProjectWizard() {
- super();
- setWindowTitle(Messages.NewProjectWizard_WindowTitle);
- setDefaultPageImageDescriptor(Activator.getImageDescriptor("/icons/JET2ProjectWizardBanner.gif")); //$NON-NLS-1$
- setNeedsProgressMonitor(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- try {
- getContainer().run(false, false, new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStatus result = JET2Platform.runTransformOnString(NEW_PROJECT_WIZARD_TX_ID, getBuildModel(), "xml", monitor); //$NON-NLS-1$
- if(!result.isOK()) {
- InternalJET2Platform.log(result);
- new ErrorDialog(getShell(), NewProjectWizard.this.getWindowTitle(),
- Messages.NewProjectWizard_ErrorInJETTransform,
- result, IStatus.ERROR | IStatus.WARNING).open();
- } else {
- final IPath mainTemplatePath = new Path(projectPage
- .getProjectName()).append(
- projectPage.getTemplateFolder()).append(
- "main.jet"); //$NON-NLS-1$
- final IFile mainTemplate = ResourcesPlugin
- .getWorkspace().getRoot().getFile(
- mainTemplatePath);
- if (mainTemplate.exists()) {
- try {
- IDE.openEditor(Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(),
- mainTemplate);
- } catch (PartInitException e) {
- InternalJET2Platform.logError(Messages.NewProjectWizard_ErrorCreatingProject, e);
- }
- }
- }
- }});
- } catch (InvocationTargetException e) {
- InternalJET2Platform.logError(Messages.NewProjectWizard_ErrorCreatingProject, e);
- } catch (InterruptedException e) {
- // cancelled, nothing to do
- }
- return true;
- }
-
- protected final String getBuildModel() {
- newProjectInfo.setProjectName(projectPage.getProjectName());
- if(!projectPage.useDefaults()) {
- newProjectInfo.setLocation(projectPage.getLocationPath().toString());
- }
- newProjectInfo.setProjectAttribute("binDir", projectPage.getJavaOutputFolder()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("jet2javaDir", projectPage.getJETOutputFolder()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("templatesDir", projectPage.getTemplateFolder()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("bundleName", projectPropertiesPage.getTransformName()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("bundleSymbolicName", projectPropertiesPage.getTransformID()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("dfltJavaPackage", projectPage.getDefaultJavaPackage()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("description", projectPropertiesPage.getTransformDescription()); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("templateLoader", projectPropertiesPage.getTemplateLoader()); //$NON-NLS-1$
- final String defaultEE = getDefaultExecutionEnv();
- if(defaultEE != null) {
- newProjectInfo.setProjectAttribute("executionEnv", defaultEE); //$NON-NLS-1$
- newProjectInfo.setProjectAttribute("useJava5", Boolean.toString(isDefaultEEJava5Compatible())); //$NON-NLS-1$
- }
- if(projectPropertiesPage.isExtension()) {
- newProjectInfo.setProjectAttribute("baseID", projectPropertiesPage.getBaseTransformID()); //$NON-NLS-1$
- final IJETBundleDescriptor descriptor = JET2Platform.getJETBundleManager().getDescriptor(projectPropertiesPage.getBaseTransformID());
- if(descriptor != null) {
- newProjectInfo.setProjectAttribute("baseStartTemplate", descriptor.getMainTemplate()); //$NON-NLS-1$
- }
- }
-
- return newProjectInfo.toXmlString();
- }
-
- private boolean isDefaultEEJava5Compatible() {
-
- final IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
- final IExecutionEnvironment java5ee = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment("J2SE-1.5"); //$NON-NLS-1$
- return Arrays.asList(java5ee.getCompatibleVMs()).contains(defaultVMInstall);
- }
-
- private String getDefaultExecutionEnv() {
- final IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
- final IExecutionEnvironment[] ee = JavaRuntime.getExecutionEnvironmentsManager().getExecutionEnvironments();
- for (int i = 0; i < ee.length; i++) {
- if(ee[i].isStrictlyCompatible(defaultVMInstall)) {
- return ee[i].getId();
- }
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // nothing to do here
- }
-
- public void addPages() {
- super.addPages();
-
- projectPage= new NewJETProjectPage1(Messages.NewProjectWizard_MainPageTabText);
- projectPage.setTitle(Messages.NewProjectWizard_MainPageTitle);
- projectPage.setDescription(Messages.NewProjectWizard_MainPageDescription);
- addPage(projectPage);
-
- projectPropertiesPage = new NewJETProjectPage2(Messages.NewProjectWizard_MainPageTabText);
- projectPropertiesPage.setJETProjectPage1(projectPage);
- projectPropertiesPage.showExtensionsGroup(allowExtensionSpecification());
- addPage(projectPropertiesPage);
- }
-
-
-
- /**
- * Indicates whether the wizard will allow specification of JET transformation extensions.
- * Clients may override this method. Default implementation returns <code>true</code>.
- * @return <code>true</code> if extension transformations will be allowed.
- */
- protected boolean allowExtensionSpecification() {
- return true;
- }
-
- public boolean canFinish() {
- final IWizardPage currentPage = getContainer().getCurrentPage();
- return super.canFinish() && currentPage != projectPage;
- }
-
-}
diff --git a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/messages.properties b/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/messages.properties
deleted file mode 100644
index 6a49c18..0000000
--- a/plugins/org.eclipse.jet.ui/src/org/eclipse/jet/ui/newproject/messages.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#NLS_MESSAGEFORMAT_VAR
-NewJETProjectPage1Controls__groupgProjSet_text=Project Settings
-NewJETProjectPage1Controls__labellblTemplateFolder_text=&Template folder:
-NewJETProjectPage1Controls__labellblJETOutput_text=J&ET output folder:
-NewJETProjectPage1Controls__labellblJavaOutput_text=J&ava output folder:
-NewJETProjectPage1Controls__labellblDefJavaPackage_text=Default &Java package:
-
-NewJETProjectPage2Controls__groupgrpTransProps_text=Transformation (plug-in) Properties
-NewJETProjectPage2Controls__labellblID_text=Transformation &ID:
-NewJETProjectPage2Controls__labellblName_text=Transformation na&me:
-NewJETProjectPage2Controls__labellblDescription_text=Transformation &description:
-NewJETProjectPage2Controls__labellblTemplateLoader_text=Template &loader:
-NewJETProjectPage2Controls_grpExtensions_text=Extensions
-NewJETProjectPage2Controls_cbxExtends_text=E&xtend an existing JET Transformation
-NewJETProjectPage2Controls_lblBaseTx_text=Base &transformation:
-
-NewJETProjectPage2_description=Enter the data required to generate the JET transformation
-NewJETProjectPage2_InvalidID=Invalid ID. Legal characters are A-Z a-z 0-9 . _
-NewJETProjectPage2_title=JET Transformation Properties

Back to the top