[subversion:7] javafx-sdk version 1.0.1
- From: dkaspar@kenai.com
- To: commits@eplugin.kenai.com
- Subject: [subversion:7] javafx-sdk version 1.0.1
- Date: Tue, 6 Jan 2009 10:29:22 +0000 (GMT)
Repository: subversion
Revision: 7
Author: dkaspar
Date: 2009-01-06 10:29:15 UTC
Log Message:
-----------
javafx-sdk version 1.0.1
source code is JDK1.5 compliant
fix for issue #114 - Error on non-ASCII character
Modified Paths:
--------------
trunk/build.xml
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/FXPer
spectiveFactory.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/Logge
r.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/JavaFXBuilder.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/Archive.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/SourceFileObject.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainer.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainerPreferencePage.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathVariableInitializer.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/AppletLaunchConfigurationTab.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/ArgumentsLaunchConfigurationTab.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/GeneralLaunchConfigurationTab.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationDelegate.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationTabGroup.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchShortcut.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/prefe
rences/ProjectPreferencePage.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/sdk/J
avaFXSDK.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/toolb
ar/FXHelpHandler.java
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/wizar
ds/NewFXScriptWizard.java
trunk/com.sun.javafx.eclipse.editor/.classpath
trunk/com.sun.javafx.eclipse.editor/src/com/sun/javafx/eclipse/editor/s
imple/KeywordDetector.java
Diffs:
-----
Index: trunk/com.sun.javafx.eclipse.editor/.classpath
===================================================================
--- trunk/com.sun.javafx.eclipse.editor/.classpath (revision 6)
+++ trunk/com.sun.javafx.eclipse.editor/.classpath (revision 7)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.
debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Index:
trunk/com.sun.javafx.eclipse.editor/src/com/sun/javafx/eclipse/editor/s
imple/KeywordDetector.java
===================================================================
---
trunk/com.sun.javafx.eclipse.editor/src/com/sun/javafx/eclipse/editor/s
imple/KeywordDetector.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.editor/src/com/sun/javafx/eclipse/editor/s
imple/KeywordDetector.java (revision 7)
@@ -31,12 +31,10 @@
public class KeywordDetector implements IWordDetector {
- @Override
public boolean isWordPart(char c) {
return Character.isJavaIdentifierPart(c);
}
- @Override
public boolean isWordStart(char c) {
return Character.isJavaIdentifierStart(c);
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/FXPer
spectiveFactory.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/FXPer
spectiveFactory.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/FXPer
spectiveFactory.java (revision 7)
@@ -49,7 +49,6 @@
private static final String WST_SNIPPETS_VIEW_ID =
"org.eclipse.wst.common.snippets.internal.ui.SnippetsView";
private static final String PERSPECTIVE_ID =
"com.sun.javafx.eclipse.core.perspective";
- @Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/Logge
r.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/Logge
r.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/Logge
r.java (revision 7)
@@ -103,7 +103,7 @@
private void logImpl(ILog log, IStatus status, String
customMessage) {
IStatus report = status;
- if (customMessage != null && !customMessage.isEmpty()) {
+ if (customMessage != null && customMessage.length() != 0) {
report = new MultiStatus(status.getPlugin(),
status.getCode(), new IStatus[]{status}, customMessage, null);
}
log.log(report);
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/prefe
rences/ProjectPreferencePage.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/prefe
rences/ProjectPreferencePage.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/prefe
rences/ProjectPreferencePage.java (revision 7)
@@ -161,12 +161,10 @@
public void init(IWorkbench workbench) {
}
- @Override
public IAdaptable getElement() {
return element;
}
- @Override
public void setElement(IAdaptable element) {
this.element = element;
if (element != null) {
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/sdk/J
avaFXSDK.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/sdk/J
avaFXSDK.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/sdk/J
avaFXSDK.java (revision 7)
@@ -81,7 +81,7 @@
}
public static boolean isValidSDK (String sdkPath) {
- if (sdkPath == null || sdkPath.isEmpty())
+ if (sdkPath == null || sdkPath.length() == 0)
return false;
File rootDirectory = new File (sdkPath.trim ());
return rootDirectory.isDirectory ()
@@ -126,14 +126,14 @@
public static String getSDKValidityTextFromPreferences () {
String sdkPath = getSDKPathFromPreferences();
String sdkValidity = isValidSDK(sdkPath) ? "JavaFX SDK
is detected" : "JavaFX SDK is missing";
- if (sdkPath == null || sdkPath.isEmpty())
+ if (sdkPath == null || sdkPath.length() == 0)
sdkPath = "not set";
return sdkValidity + " - <" + sdkPath + ">";
}
public static String
getSDKProfileValidityTextFromPreferences(String profile) {
String profileValidity =
isValidProfileFromPreferences(profile) ? "JavaFX Profile is detected" :
"JavaFX Profile is invalid";
- if (profile == null || profile.isEmpty())
+ if (profile == null || profile.length() == 0)
profile = "not set";
return profileValidity + " - <" + profile + ">";
}
@@ -189,7 +189,7 @@
String[] splitValues = propertyValue.split(";");
if (splitValues != null)
for (String splitValue : splitValues) {
- if (splitValue.isEmpty())
+ if (splitValue.length() == 0)
continue;
paths.add (splitValue.replace
("${javafx_home}", sdkPath));
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainerPreferencePage.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainerPreferencePage.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainerPreferencePage.java (revision 7)
@@ -66,24 +66,20 @@
super ("JavaFX System Library", "JavaFX System
Library",
Activator.getDefault().getImageRegistry().getDescriptor("/icons/javafx_
icon.png"));
}
- @Override
public boolean finish() {
javafxProject.getPreferenceStore().setValue
(PreferenceConstants.PREF_PROFILE, profile);
SDKClasspathContainerInitializer.addClasspathContainerToJavaProject(jav
afxProject.getJavaProject());
return true;
}
- @Override
public IClasspathEntry getSelection() {
return containerEntry;
}
- @Override
public void setSelection(IClasspathEntry containerEntry) {
this.containerEntry = containerEntry;
}
- @Override
public void createControl(Composite parent) {
Composite root = new Composite (parent, SWT.NONE);
setControl(root);
@@ -104,9 +100,7 @@
variablesButton.setText ("Change");
variablesButton.setLayoutData(createGridData(1,
false));
variablesButton.addSelectionListener(new
SelectionListener () {
- @Override
public void
widgetDefaultSelected(SelectionEvent e) {}
- @Override
public void widgetSelected(SelectionEvent e) {
openVariablesPreferences (getShell());
updateDialog ();
@@ -131,9 +125,7 @@
desktopProfile.setText("Desktop");
desktopProfile.setLayoutData(createGridData(1, true));
desktopProfile.addSelectionListener(new
SelectionListener () {
- @Override
public void
widgetDefaultSelected(SelectionEvent e) {}
- @Override
public void widgetSelected(SelectionEvent e) {
profile =
JavaFXSDK.VALUE_PROFILE_DESKTOP;
updateProfileSelection();
@@ -144,9 +136,7 @@
mobileProfile.setText("Mobile");
mobileProfile.setLayoutData(createGridData(1, true));
mobileProfile.addSelectionListener(new
SelectionListener () {
- @Override
public void
widgetDefaultSelected(SelectionEvent e) {}
- @Override
public void widgetSelected(SelectionEvent e) {
profile =
JavaFXSDK.VALUE_PROFILE_MOBILE;
updateProfileSelection();
@@ -201,7 +191,6 @@
mobileProfile.setSelection(JavaFXSDK.VALUE_PROFILE_MOBILE.equals
(profile));
}
- @Override
public void initialize(IJavaProject javaProject,
IClasspathEntry[] currentEntries) {
javafxProject =
JavaFXProject.create(javaProject.getProject());
profile =
javafxProject.getPreferenceStore().getString(PreferenceConstants.PREF_P
ROFILE);
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainer.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainer.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathContainer.java (revision 7)
@@ -58,7 +58,6 @@
this.profile = profile;
}
- @Override
public IClasspathEntry[] getClasspathEntries() {
// if (cache == null) {
List<IClasspathEntry> entries = new
ArrayList<IClasspathEntry> ();
@@ -73,17 +72,14 @@
// return cache;
}
- @Override
public String getDescription() {
return "JavaFX System Library";
}
- @Override
public int getKind() {
return K_DEFAULT_SYSTEM;
}
- @Override
public IPath getPath() {
return CONTAINER_ID;
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathVariableInitializer.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathVariableInitializer.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/class
path/SDKClasspathVariableInitializer.java (revision 7)
@@ -83,7 +83,6 @@
e.printStackTrace(); // TODO
}
PlatformUI.getWorkbench().getDisplay().asyncExec(new
Runnable() {
- @Override
public void run() {
uiCheckForMissingJavaFX();
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/toolb
ar/FXHelpHandler.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/toolb
ar/FXHelpHandler.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/toolb
ar/FXHelpHandler.java (revision 7)
@@ -40,7 +40,6 @@
public static final String ID_ACTION_SET =
"com.sun.javafx.eclipse.core.toolbar.actionSet";
- @Override
public Object execute(ExecutionEvent event) throws
ExecutionException {
String path = JavaFXSDK.getSDKPathFromPreferences();
try {
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/wizar
ds/NewFXScriptWizard.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/wizar
ds/NewFXScriptWizard.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/wizar
ds/NewFXScriptWizard.java (revision 7)
@@ -152,7 +152,7 @@
final IFile file = container.getFile(new
Path(fileName));
try {
String packageStatement =
page.getPackageText();
- if (! packageStatement.isEmpty())
+ if (packageStatement.length() != 0)
packageStatement = "package " +
packageStatement + ";";
String document = stream2string
(openContentStream(), packageStatement, page.getTypeName(),
System.getProperty("user.name"));
ByteArrayInputStream stream = new
ByteArrayInputStream (document.getBytes());
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/Archive.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/Archive.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/Archive.java (revision 7)
@@ -154,7 +154,7 @@
private static class FolderArchive extends Archive {
final IFolder root;
- Charset encoding;
+ Charset encoding = Charset.forName("UTF-8");
/** Creates a new instance of FolderArchive */
public FolderArchive (final IFolder root) {
@@ -287,7 +287,7 @@
}
}
}
-
+
private void trunc() {
// strip the name array:
byte[] newNames = new byte[nameOffset];
@@ -299,7 +299,7 @@
fld.trunc();
}
}
-
+
private Map<String,Folder> createMap(File file ) throws
IOException {
if (!file.canRead()) {
return Collections.<String, Folder>emptyMap();
@@ -392,7 +392,7 @@
* referred to by a <code>jar</code>-protocol URL.
* <strong>Remember</strong> that any path within the archive is
discarded
* so you may need to check for non-root entries.
- * @param url a URL
+ * @param url a URL = Charset.forName("UTF-8")
* @return the embedded archive URL, or null if the URL is not a
* <code>jar</code>-protocol URL containing
<code>!/</code>
* @since 4.48
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/SourceFileObject.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/SourceFileObject.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/classpath/SourceFileObject.java (revision 7)
@@ -39,6 +39,7 @@
import java.net.MalformedURLException;
import java.net.URI;
import java.nio.CharBuffer;
+import java.nio.charset.Charset;
import javax.lang.model.element.Modifier;
import javax.tools.JavaFileObject;
@@ -112,13 +113,11 @@
return new StringReader (_text);
}
else {
- Reader r;
try {
- r = new InputStreamReader (new
BufferedInputStream (this.file.getContents()));
+ return new InputStreamReader
(this.file.getContents(), this.file.getCharset());
} catch (CoreException e) {
- throw new IOException(e);
+ throw new IOException("CoreException: "
+ e.getMessage());
}
- return r;
}
}
@@ -138,7 +137,7 @@
try {
return this.file.getContents();
} catch (CoreException e) {
- throw new IOException(e);
+ throw new IOException("CoreException: "
+ e.getMessage());
}
}
}
@@ -230,7 +229,7 @@
while ((rv=in.read(result,red,len-red))>0 &&
(red=red+rv)<len);
length = len;
} catch (CoreException e) {
- throw new IOException(e);
+ throw new IOException("CoreException: "
+ e.getMessage());
} finally {
in.close();
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/JavaFXBuilder.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/JavaFXBuilder.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/build
er/JavaFXBuilder.java (revision 7)
@@ -218,6 +218,11 @@
List<String> options = new ArrayList<String>();
//options.add("-Xjcov"); //NOI18N, Make the
compiler store end positions
options.add("-XDdisableStringFolding");
//NOI18N
+ options.add("-encoding"); //NOI18N
+ String charset = file.getCharset();
+ if (charset == null)
+ charset = "UTF-8"; //NOI18N
+ options.add(charset);
File f = new File(srcDir, file.getName());
JavafxcTask task = tool.getTask(null, fm,
dl, options, Collections.singleton(jfo));
task.parse();
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/AppletLaunchConfigurationTab.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/AppletLaunchConfigurationTab.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/AppletLaunchConfigurationTab.java (revision 7)
@@ -52,16 +52,13 @@
private Text fieldAppWidth;
private Text fieldAppHeight;
- @Override
public void activated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public boolean canSave() {
return true; // TODO
}
- @Override
public void createControl(Composite parent) {
dispose ();
control = new Composite(parent, SWT.NONE);
@@ -91,7 +88,7 @@
fieldAppWidth = new Text (sizeGroup, SWT.SINGLE |
SWT.BORDER);
fieldAppWidth.setLayoutData(new GridData(SWT.FILL,
SWT.CENTER, true, false));
fieldAppWidth.addModifyListener(new ModifyListener () {
- @Override public void modifyText(ModifyEvent e)
{ notifyModified (); }
+ public void modifyText(ModifyEvent e) {
notifyModified (); }
});
Label heightLabel = new Label (sizeGroup, SWT.NONE);
@@ -101,15 +98,13 @@
fieldAppHeight = new Text (sizeGroup, SWT.SINGLE |
SWT.BORDER);
fieldAppHeight.setLayoutData(new GridData(SWT.FILL,
SWT.CENTER, true, false));
fieldAppHeight.addModifyListener(new ModifyListener ()
{
- @Override public void modifyText(ModifyEvent e)
{ notifyModified (); }
+ public void modifyText(ModifyEvent e) {
notifyModified (); }
});
}
- @Override
public void deactivated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public void dispose() {
if (control == null)
return;
@@ -119,27 +114,22 @@
fieldAppHeight = null;
}
- @Override
public Control getControl() {
return control;
}
- @Override
public String getErrorMessage() {
return null;
}
- @Override
public Image getImage() {
return null;
}
- @Override
public String getMessage() {
return null;
}
- @Override
public String getName() {
return "Applet";
}
@@ -149,7 +139,6 @@
dialog.updateButtons();
}
- @Override
public void initializeFrom(ILaunchConfiguration configuration)
{
try {
fieldAppWidth.setText(configuration.getAttribute(LaunchConstants.ATTR_A
PPLET_WIDTH, ""));
@@ -159,26 +148,21 @@
}
}
- @Override
public boolean isValid(ILaunchConfiguration launchConfig) {
return true;
}
- @Override
public void launched(ILaunch launch) {
}
- @Override
public void performApply(ILaunchConfigurationWorkingCopy
configuration) {
configuration.setAttribute(LaunchConstants.ATTR_APPLET_WIDTH,
fieldAppWidth.getText());
configuration.setAttribute(LaunchConstants.ATTR_APPLET_HEIGHT,
fieldAppHeight.getText());
}
- @Override
public void setDefaults(ILaunchConfigurationWorkingCopy
configuration) {
}
- @Override
public void
setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) {
this.dialog = dialog;
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/ArgumentsLaunchConfigurationTab.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/ArgumentsLaunchConfigurationTab.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/ArgumentsLaunchConfigurationTab.java (revision 7)
@@ -51,16 +51,13 @@
private Composite control;
private Text fieldArguments;
- @Override
public void activated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public boolean canSave() {
return true; // TODO
}
- @Override
public void createControl(Composite parent) {
dispose ();
control = new Composite(parent, SWT.NONE);
@@ -82,7 +79,7 @@
fieldArguments = new Text (argumentsGroup, SWT.MULTI |
SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
fieldArguments.setLayoutData(new
GridData(GridData.FILL, GridData.FILL, true, true));
fieldArguments.addModifyListener(new ModifyListener ()
{
- @Override public void modifyText(ModifyEvent e)
{ notifyModified (); }
+ public void modifyText(ModifyEvent e) {
notifyModified (); }
});
Label argumentsLabel = new Label (argumentsGroup,
SWT.NONE);
@@ -90,11 +87,9 @@
argumentsLabel.setLayoutData(new
GridData(GridData.FILL, GridData.CENTER, true, false));
}
- @Override
public void deactivated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public void dispose() {
if (control == null)
return;
@@ -103,27 +98,22 @@
fieldArguments = null;
}
- @Override
public Control getControl() {
return control;
}
- @Override
public String getErrorMessage() {
return null;
}
- @Override
public Image getImage() {
return null;
}
- @Override
public String getMessage() {
return null;
}
- @Override
public String getName() {
return "Arguments";
}
@@ -133,7 +123,6 @@
dialog.updateButtons();
}
- @Override
public void initializeFrom(ILaunchConfiguration configuration)
{
try {
fieldArguments.setText(configuration.getAttribute(LaunchConstants.ATTR_
ARGUMENTS, ""));
@@ -142,25 +131,20 @@
}
}
- @Override
public boolean isValid(ILaunchConfiguration launchConfig) {
return true;
}
- @Override
public void launched(ILaunch launch) {
}
- @Override
public void performApply(ILaunchConfigurationWorkingCopy
configuration) {
configuration.setAttribute(LaunchConstants.ATTR_ARGUMENTS,
fieldArguments.getText());
}
- @Override
public void setDefaults(ILaunchConfigurationWorkingCopy
configuration) {
}
- @Override
public void
setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) {
this.dialog = dialog;
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationTabGroup.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationTabGroup.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationTabGroup.java (revision 7)
@@ -37,7 +37,6 @@
public LaunchConfigurationTabGroup() {
}
- @Override
public void createTabs(ILaunchConfigurationDialog dialog,
String mode) {
setTabs(new ILaunchConfigurationTab[] {
new GeneralLaunchConfigurationTab (),
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchShortcut.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchShortcut.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchShortcut.java (revision 7)
@@ -47,7 +47,6 @@
public class LaunchShortcut implements ILaunchShortcut {
- @Override
public void launch(ISelection selection, String mode) {
IJavaProject[] javaProject = new IJavaProject[1];
String[] className = new String[1];
@@ -56,7 +55,6 @@
launch(javaProject[0], className[0], mode);
}
- @Override
public void launch(IEditorPart editor, String mode) {
IJavaProject[] javaProject = new IJavaProject[1];
String[] className = new String[1];
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/GeneralLaunchConfigurationTab.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/GeneralLaunchConfigurationTab.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/GeneralLaunchConfigurationTab.java (revision 7)
@@ -66,16 +66,13 @@
private Combo fieldTarget;
private Text fieldMainClass;
- @Override
public void activated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public boolean canSave() {
return true; // TODO
}
- @Override
public void createControl(Composite parent) {
dispose ();
control = new Composite(parent, SWT.NONE);
@@ -110,21 +107,18 @@
fieldProjectName = new Text (projectGroup, SWT.SINGLE |
SWT.BORDER);
fieldProjectName.setLayoutData(new
GridData(GridData.FILL, GridData.CENTER, true, false));
fieldProjectName.addModifyListener(new ModifyListener
() {
- @Override public void modifyText(ModifyEvent e)
{ notifyModified (); }
+ public void modifyText(ModifyEvent e) {
notifyModified (); }
});
fieldProjectNameButton = new Button (projectGroup,
SWT.PUSH);
fieldProjectNameButton.setLayoutData(new
GridData(GridData.CENTER, GridData.CENTER, false, false));
fieldProjectNameButton.setText("Browse");
fieldProjectNameButton.addSelectionListener(new
SelectionListener () {
- @Override
public void widgetSelected(SelectionEvent e) {
String prj =
JavaUISupport.getJavaProjectName(JavaUISupport.chooseJavaProject
(control.getShell(), getJavaProject()));
if (prj != null)
fieldProjectName.setText (prj);
}
-
- @Override
public void
widgetDefaultSelected(SelectionEvent e) {
}
});
@@ -140,8 +134,8 @@
fieldTarget.setLayoutData(new GridData (SWT.FILL,
SWT.CENTER, true, false));
fieldTarget.setItems(LaunchConstants.LIST_DESC_TARGET);
fieldTarget.addSelectionListener(new SelectionListener
() {
- @Override public void
widgetSelected(SelectionEvent e) { notifyModified (); }
- @Override public void
widgetDefaultSelected(SelectionEvent e) {}
+ public void widgetSelected(SelectionEvent e) {
notifyModified (); }
+ public void
widgetDefaultSelected(SelectionEvent e) {}
});
}
@@ -154,17 +148,15 @@
fieldMainClass = new Text (mainGroup, SWT.SINGLE |
SWT.BORDER);
fieldMainClass.setLayoutData(new
GridData(GridData.FILL, GridData.CENTER, true, false));
fieldMainClass.addModifyListener(new ModifyListener ()
{
- @Override public void modifyText(ModifyEvent e)
{ notifyModified (); }
+ public void modifyText(ModifyEvent e) {
notifyModified (); }
});
// TODO - .java, .fx file browser
}
- @Override
public void deactivated(ILaunchConfigurationWorkingCopy
workingCopy) {
}
- @Override
public void dispose() {
if (control == null)
return;
@@ -177,27 +169,22 @@
fieldMainClass = null;
}
- @Override
public Control getControl() {
return control;
}
- @Override
public String getErrorMessage() {
return null;
}
- @Override
public Image getImage() {
return null;
}
- @Override
public String getMessage() {
return null;
}
- @Override
public String getName() {
return "General";
}
@@ -207,7 +194,6 @@
dialog.updateButtons();
}
- @Override
public void initializeFrom(ILaunchConfiguration configuration)
{
try {
IJavaElement javaElement =
JavaUISupport.getActiveJavaElement();
@@ -227,16 +213,13 @@
}
}
- @Override
public boolean isValid(ILaunchConfiguration launchConfig) {
return true;
}
- @Override
public void launched(ILaunch launch) {
}
- @Override
public void performApply(ILaunchConfigurationWorkingCopy
configuration) {
configuration.setAttribute(LaunchConstants.ATTR_PROJECT_NAME,
fieldProjectName.getText());
int targetIndex = fieldTarget.getSelectionIndex();
@@ -244,18 +227,16 @@
configuration.setAttribute(LaunchConstants.ATTR_MAIN_CLASS,
fieldMainClass.getText());
}
- @Override
public void setDefaults(ILaunchConfigurationWorkingCopy
configuration) {
}
- @Override
public void
setLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) {
this.dialog = dialog;
}
private IJavaProject getJavaProject() {
String projectName = fieldProjectName.getText().trim();
- if (projectName.isEmpty ())
+ if (projectName.length() == 0)
return null;
return
JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjec
t (projectName);
}
Index:
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationDelegate.java
===================================================================
---
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationDelegate.java (revision 6)
+++
trunk/com.sun.javafx.eclipse.core/src/com/sun/javafx/eclipse/core/launc
h/LaunchConfigurationDelegate.java (revision 7)
@@ -64,7 +64,6 @@
public class LaunchConfigurationDelegate implements
ILaunchConfigurationDelegate {
- @Override
public void launch(ILaunchConfiguration configuration, String
mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Packaging JavaFX Application", 2);
@@ -117,7 +116,7 @@
errorHappened ("JavaFX SDK is not setup
correctly.", "Fix 'JAVAFX_HOME' variable at 'MainMenu -> Project ->
Properties -> Java Build Path -> Libraries -> JavaFX System Library ->
Edit'", monitor);
return;
}
- if (mainClass == null || mainClass.isEmpty()) {
+ if (mainClass == null || mainClass.length() == 0) {
errorHappened ("The application main class or
script is not specified.", "Specify it at your configuration (" +
configuration.getName() + ").", monitor);
return;
}
@@ -255,7 +254,6 @@
private void errorHappened(final String error, final String
fix, IProgressMonitor monitor) throws CoreException {
monitor.setCanceled(true);
getStandardDisplay().asyncExec(new Runnable () {
- @Override
public void run() {
MessageBox message = new MessageBox
(getShell(), SWT.OK | SWT.ICON_ERROR | SWT.APPLICATION_MODAL);
message.setMessage("Cannot run JavaFX
Application\nReason: " + error + "\nSolution: " + fix + "\n");
@@ -314,7 +312,7 @@
private static IProject getProject(ILaunchConfiguration
configuration) throws CoreException {
String projectName = getProjectName(configuration);
- if (projectName != null && !
projectName.trim().isEmpty())
+ if (projectName != null &&
projectName.trim().length() != 0)
return
ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
return null;
}
@@ -334,7 +332,7 @@
}
private static boolean isEmpty(String string) {
- return string == null || string.isEmpty();
+ return string == null || string.length() == 0;
}
private static Display getStandardDisplay() {
Index: trunk/build.xml
===================================================================
--- trunk/build.xml (revision 6)
+++ trunk/build.xml (revision 7)
@@ -39,7 +39,7 @@
<property name="javafx.sdk.version" value="b55"/>
<property name="javafx.sdk.root.dir" value="javafx-sdk1.0"/>
- <property name="javafx.sdk.build.url"
value="javafx_sdk-1_0-${platform}.zip"/>
+ <property name="javafx.sdk.build.url"
value="javafx_sdk-1_0_1-${platform}.zip"/>
<target name="clean">
<echo>=====================================================</echo>
|
[subversion:7] javafx-sdk version 1.0.1 |
dkaspar | 01/06/2009 |





