diff --git a/.classpath b/.classpath index 9500462..af081f3 100644 --- a/.classpath +++ b/.classpath @@ -14,8 +14,8 @@ - - + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 1e512de..b2f4a56 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,3 @@ -#Tue Jul 04 19:55:57 CEST 2006 eclipse.preferences.version=1 org.eclipse.jdt.core.codeComplete.argumentPrefixes= org.eclipse.jdt.core.codeComplete.argumentSuffixes= @@ -9,15 +8,16 @@ org.eclipse.jdt.core.codeComplete.localSuffixes= org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.compliance=1.6 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.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 diff --git a/ChangeLog-Ui.txt b/ChangeLog-Ui.txt index 7b737d3..203159b 100644 --- a/ChangeLog-Ui.txt +++ b/ChangeLog-Ui.txt @@ -1,4 +1,13 @@ $Id$ +Release 0.8.3 (build number 306): + +* Upgraded to Grand core 1.9.4, +* Upgraded to Eclipse 4.6.2, +* Upgraded to Ant 1.10.0, +* Download JzGraph from GitHub, +* Removed dot fallback for GTK in PrintAction. + + Release 0.8.2 (build number 302): * Upgraded to Grand core 1.9.3, @@ -95,7 +104,7 @@ Release 0.3 (build number 48): Release 0.2: * The UI can now open several graphs in several tabs, -* Rewritten tootips for both Node & Links, +* Rewritten tooltips for both Node & Links, * The antcall/ant parameters are now displayed on the link's tooltip, * Upgrade to Eclipse RCP 3.0RC2, Draw2d 20040610 and Grand (core) 1.4, * The graph can use the bus routing capability of JzGraph. diff --git a/LICENSE b/LICENSE index 3122ebd..9625d65 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ * $Id$ - * Copyright (c) 2002-2004, Christophe Labouisse + * Copyright (c) 2004-2016, Christophe Labouisse * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. - + SUBCOMPONENTS: SWT and Draw2D libraries are subject to the Common Public License included in @@ -38,7 +38,7 @@ included in the COPYING file, except where the GraphViz license, included in the LICENSE-Graphviz.txt file, prevails. The included jzgraph.jar archive is a modified version of JzGraph 1.3. A jar package with source is available at http://www.ggtools.net/files/grand/extlibs. - + Other jars distributed in the lib subdirectory are subject to either the Apache Software License version 1.1 or 2.0 included below. @@ -96,7 +96,7 @@ Apache Software License version 1.1 or 2.0 included below. * . */ -/* +/* * Copyright 2000-2002,2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -110,6 +110,5 @@ Apache Software License version 1.1 or 2.0 included below. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * */ - diff --git a/build-local.properties b/build-local.properties index 0f28334..c87f7a5 100644 --- a/build-local.properties +++ b/build-local.properties @@ -1,5 +1,5 @@ # Grand -grand.download.site=file://${user.home}/Projects/grand/target +grand.download.site=file://${user.home}/Projects/grand/dist # JzGraph #jzgraph.download.site=file://${user.home}/Projects/jzgraph/target diff --git a/build.properties b/build.properties index f6504af..aa43884 100644 --- a/build.properties +++ b/build.properties @@ -1,18 +1,18 @@ -product.version=0.8.2 -grand-core.version=1.9.3 +product.version=0.8.3 +grand-core.version=1.9.4 -eclipse.version=4.6.1 -eclipse.timestamp=201609071200 +eclipse.version=4.6.2 +eclipse.timestamp=201611241400 eclipse.core.version=3.10.2 eclipse.gef.version=4.0.0 eclipse.gef.timestamp=201606061308 eclipse.equinox.version=3.8.0 eclipse.commands.version=3.8.0 eclipse.draw2d.version=3.10.100 -eclipse.jface.version=3.12.0 -eclipse.osgi.version=3.11.1 -eclipse.workbench.version=3.108.1 -swt.version=3.105.1.v20160907-0248 +eclipse.jface.version=3.12.1 +eclipse.osgi.version=3.11.2 +eclipse.workbench.version=3.108.2 +swt.version=3.105.2.v20161122-0613 icu.version=56.1.0 # Configuration for downloads @@ -22,7 +22,7 @@ grand.download.site=https://github.com/Ant-Grand/Grand/releases/download/${grand url.grand.jar=${grand.download.site}/grand-${grand-core.version}.jar # Ant -ant.jar.version=1.9.7 +ant.jar.version=1.10.0 ant.download.site=http://repo1.maven.org/maven2/org/apache/ant url.ant.jar=${ant.download.site}/ant/${ant.jar.version}/ant-${ant.jar.version}.jar url.ant-launcher.jar=${ant.download.site}/ant-launcher/${ant.jar.version}/ant-launcher-${ant.jar.version}.jar @@ -42,8 +42,8 @@ eclipse.gef.download.site=http://ftp.halifax.rwth-aachen.de/eclipse/tools/gef/do url.gef=${eclipse.gef.download.site}/${eclipse.gef.version}/R${eclipse.gef.timestamp}/GEF3-Update-${eclipse.gef.version}.zip # JzGraph -jzgraph.download.site=http://gabugruik.free.fr/ggTools/files/grand/extlibs -url.jzgraph.jar=${jzgraph.download.site}/jzgraph-1.3-ggtools.jar +jzgraph.download.site=https://github.com/Ant-Grand/GrandUI/releases/download/0.8 +url.jzgraph.jar=${jzgraph.download.site}/jzgraph.jar url.blacksun-util.jar=${jzgraph.download.site}/blacksun_util.jar # Oro diff --git a/src/main/java/net/ggtools/grand/ui/actions/PrintAction.java b/src/main/java/net/ggtools/grand/ui/actions/PrintAction.java index a6eb9e0..9debf60 100644 --- a/src/main/java/net/ggtools/grand/ui/actions/PrintAction.java +++ b/src/main/java/net/ggtools/grand/ui/actions/PrintAction.java @@ -77,9 +77,6 @@ public final void run() { * else { log.error("No printer available, disabling print"); * setEnabled(false); } */ - if (SWT.getPlatform().equals("gtk")) { - getGraphController().dotPrint(); - } } /** diff --git a/src/main/java/net/ggtools/grand/ui/graph/GraphController.java b/src/main/java/net/ggtools/grand/ui/graph/GraphController.java index 8a478cf..1bd385b 100644 --- a/src/main/java/net/ggtools/grand/ui/graph/GraphController.java +++ b/src/main/java/net/ggtools/grand/ui/graph/GraphController.java @@ -314,53 +314,6 @@ public final void deselectNode(final Draw2dNode node) { } } - /** - * Hack for gtk: print using the dot command. - */ - public final void dotPrint() { - if (LOG.isDebugEnabled()) { - LOG.debug("Printing graph using dot"); - } - final Properties props = new Properties(); - props.setProperty("dot.graph.attributes", "rankdir=\"TB\""); - String dotParameters; - switch (printMode) { - case PrintFigureOperation.FIT_WIDTH: - dotParameters = "-Gpage=8,11 -Gsize=10,65536 -Grotate=90 -Gmargin=0.45"; - break; - - case PrintFigureOperation.FIT_HEIGHT: - dotParameters = "-Gpage=8,11 -Gsize=65536,7 -Grotate=90 -Gmargin=0.45"; - break; - - case PrintFigureOperation.FIT_PAGE: - dotParameters = "-Gpage=8,11 -Gsize=10,7 -Grotate=90 -Gmargin=0.45"; - break; - - default: - dotParameters = "-Gpage=8,11 -Grotate=90"; - break; - } - try { - final DotWriter dotWriter = new DotWriter(props); - dotWriter.setProducer(filterChain); - dotWriter.setShowGraphName(true); - dotWriter.write(new File("GrandDotPrint.dot")); - final Process proc = Runtime.getRuntime().exec( - "dot -Tps " + dotParameters + " -o GrandDotPrint.ps GrandDotPrint.dot"); - proc.waitFor(); - proc.destroy(); - LOG.info("Graph printed to GrandDotPrint.ps"); - final MessageDialog dialog = new MessageDialog(window.getShell(), "Graph printed", - Application.getInstance().getImage(Application.APPLICATION_ICON), - "Graph saved as GraphDotPrint.ps", MessageDialog.INFORMATION, - new String[]{"OK"}, 0); - dialog.open(); - } catch (final Exception e) { - LOG.error("Got exception printing", e); - } - } - /** * Enable or disable the use of the bus routing algorithm for graph layout. * diff --git a/src/main/java/net/ggtools/grand/ui/log/LogEventBufferImpl.java b/src/main/java/net/ggtools/grand/ui/log/LogEventBufferImpl.java index af6514e..352e438 100644 --- a/src/main/java/net/ggtools/grand/ui/log/LogEventBufferImpl.java +++ b/src/main/java/net/ggtools/grand/ui/log/LogEventBufferImpl.java @@ -47,7 +47,7 @@ public final class LogEventBufferImpl implements LogEventBuffer { /** * Field instance. */ - private static LogEventBufferImpl instance; + private static volatile LogEventBufferImpl instance; /** * Logger for this class. @@ -67,8 +67,10 @@ public final class LogEventBufferImpl implements LogEventBuffer { * @return the instance. */ public static LogEventBufferImpl getInstance() { - if (instance == null) { - instance = new LogEventBufferImpl(); + synchronized (LogEventBufferImpl.class) { + if (instance == null) { + instance = new LogEventBufferImpl(); + } } return instance; } diff --git a/src/main/java/net/ggtools/grand/ui/prefs/ComplexPreferenceStore.java b/src/main/java/net/ggtools/grand/ui/prefs/ComplexPreferenceStore.java index 8214ab1..d141c8f 100644 --- a/src/main/java/net/ggtools/grand/ui/prefs/ComplexPreferenceStore.java +++ b/src/main/java/net/ggtools/grand/ui/prefs/ComplexPreferenceStore.java @@ -438,7 +438,7 @@ public String get(final String key) { return props.getProperty(key); } - public Collection getKeys() { + public Collection getKeys() { return props.keySet(); } diff --git a/src/main/java/net/ggtools/grand/ui/prefs/SpinnerFieldEditor.java b/src/main/java/net/ggtools/grand/ui/prefs/SpinnerFieldEditor.java index 86a27d9..a5a09c0 100644 --- a/src/main/java/net/ggtools/grand/ui/prefs/SpinnerFieldEditor.java +++ b/src/main/java/net/ggtools/grand/ui/prefs/SpinnerFieldEditor.java @@ -31,7 +31,7 @@ public class SpinnerFieldEditor extends FieldEditor { * * @see #setValidateStrategy */ - public static final int VALIDATE_ON_KEY_STROKE = 0; + private static final int VALIDATE_ON_KEY_STROKE = 0; /** * Validation strategy constant (value 1) indicating that the @@ -39,13 +39,13 @@ public class SpinnerFieldEditor extends FieldEditor { * * @see #setValidateStrategy */ - public static final int VALIDATE_ON_FOCUS_LOST = 1; + private static final int VALIDATE_ON_FOCUS_LOST = 1; /** * Text limit constant (value -1) indicating unlimited text * limit and width. */ - public static final int UNLIMITED = -1; + private static final int UNLIMITED = -1; /** * Cached valid state. diff --git a/src/main/java/net/ggtools/grand/ui/widgets/AboutDialog.java b/src/main/java/net/ggtools/grand/ui/widgets/AboutDialog.java index 700ec3f..043765f 100644 --- a/src/main/java/net/ggtools/grand/ui/widgets/AboutDialog.java +++ b/src/main/java/net/ggtools/grand/ui/widgets/AboutDialog.java @@ -108,7 +108,7 @@ protected final Control createDialogArea(final Composite parent) { image.setImage(Application.getInstance().getImage(Application.ABOUT_DIALOG_IMAGE)); final Label message = new Label(composite, SWT.NONE); final StringBuilder messageBuffer = new StringBuilder( - "Grand (C)2004,2005 Christophe Labouisse, distributed under BSD License\nUi: "); + "Grand (C)2004-2016 Christophe Labouisse, distributed under BSD License\nUi: "); messageBuffer.append(Application.getInstance().getVersionString()); if (coreConfiguration != null) { messageBuffer.append("\nCore: ").append(coreConfiguration.getVersionString()); diff --git a/src/main/java/net/ggtools/grand/ui/widgets/property/PropertyEditor.java b/src/main/java/net/ggtools/grand/ui/widgets/property/PropertyEditor.java index 4051f0c..f80cb6f 100644 --- a/src/main/java/net/ggtools/grand/ui/widgets/property/PropertyEditor.java +++ b/src/main/java/net/ggtools/grand/ui/widgets/property/PropertyEditor.java @@ -415,7 +415,7 @@ public void sortByValue() { /** * Field columnNamesToNumMap. */ - private static Map columnNamesToNumMap = null; + private static volatile Map columnNamesToNumMap = null; // Set column names /** @@ -450,11 +450,13 @@ public void sortByValue() { * @param style int */ public PropertyEditor(final Composite parent, final int style) { - if (columnNamesToNumMap == null) { - columnNamesToNumMap = new HashMap(); - columnNamesToNumMap.put(STATUS_COLUMN, STATUS_COLUMN_NUM); - columnNamesToNumMap.put(NAME_COLUMN, NAME_COLUMN_NUM); - columnNamesToNumMap.put(VALUE_COLUMN, VALUE_COLUMN_NUM); + synchronized (this) { + if (columnNamesToNumMap == null) { + columnNamesToNumMap = new HashMap(); + columnNamesToNumMap.put(STATUS_COLUMN, STATUS_COLUMN_NUM); + columnNamesToNumMap.put(NAME_COLUMN, NAME_COLUMN_NUM); + columnNamesToNumMap.put(VALUE_COLUMN, VALUE_COLUMN_NUM); + } } propertyList = new PropertyList(); diff --git a/src/main/resources/net/ggtools/grand/ui/buildnum.properties b/src/main/resources/net/ggtools/grand/ui/buildnum.properties index f8878d6..2656e1d 100644 --- a/src/main/resources/net/ggtools/grand/ui/buildnum.properties +++ b/src/main/resources/net/ggtools/grand/ui/buildnum.properties @@ -1,6 +1,6 @@ -#Wed, 09 Nov 2016 11:57:55 +0100 +#Sat, 31 Dec 2016 19:29:00 +0100 #Tue Jul 04 20:50:51 CEST 2006 -build.time=11\:57\:55 -build.number=302 -build.version.string=0.8.2 -build.date=2016-11-09 +build.time=19\:29\:00 +build.number=306 +build.version.string=0.8.3 +build.date=2016-12-31