Skip to content

Commit

Permalink
Merge pull request #6 from twogee/master
Browse files Browse the repository at this point in the history
On the heels of Ant 1.10.0...
  • Loading branch information
twogee authored Dec 31, 2016
2 parents 38511cd + e33904f commit 14be43e
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 94 deletions.
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<classpathentry kind="lib" path="deps/org.eclipse.core.commands_3.8.0.v20160316-1921.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.draw2d_3.10.100.201606061308.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.equinox.common_3.8.0.v20160509-1230.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.jface_3.12.0.v20160518-1929.jar"/>
<classpathentry kind="lib" path="deps/oro.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.osgi_3.11.1.v20160708-1632.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.jface_3.12.1.v20160923-1528.jar"/>
<classpathentry kind="lib" path="deps/org.eclipse.osgi_3.11.2.v20161107-1947.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
8 changes: 4 additions & 4 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -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
Expand Down
11 changes: 10 additions & 1 deletion ChangeLog-Ui.txt
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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.
Expand Down
11 changes: 5 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -96,7 +96,7 @@ Apache Software License version 1.1 or 2.0 included below.
* <http://www.apache.org/>.
*/

/*
/*
* Copyright 2000-2002,2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -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.
*
*
*/

2 changes: 1 addition & 1 deletion build-local.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 11 additions & 11 deletions build.properties
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/ggtools/grand/ui/actions/PrintAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

/**
Expand Down
47 changes: 0 additions & 47 deletions src/main/java/net/ggtools/grand/ui/graph/GraphController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public String get(final String key) {
return props.getProperty(key);
}

public Collection<?> getKeys() {
public Collection<Object> getKeys() {
return props.keySet();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ 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 <code>1</code>) indicating that the
* editor should perform validation only when the text widget loses focus.
*
* @see #setValidateStrategy
*/
public static final int VALIDATE_ON_FOCUS_LOST = 1;
private static final int VALIDATE_ON_FOCUS_LOST = 1;

/**
* Text limit constant (value <code>-1</code>) indicating unlimited text
* limit and width.
*/
public static final int UNLIMITED = -1;
private static final int UNLIMITED = -1;

/**
* Cached valid state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public void sortByValue() {
/**
* Field columnNamesToNumMap.
*/
private static Map<String, Integer> columnNamesToNumMap = null;
private static volatile Map<String, Integer> columnNamesToNumMap = null;

// Set column names
/**
Expand Down Expand Up @@ -450,11 +450,13 @@ public void sortByValue() {
* @param style int
*/
public PropertyEditor(final Composite parent, final int style) {
if (columnNamesToNumMap == null) {
columnNamesToNumMap = new HashMap<String, Integer>();
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<String, Integer>();
columnNamesToNumMap.put(STATUS_COLUMN, STATUS_COLUMN_NUM);
columnNamesToNumMap.put(NAME_COLUMN, NAME_COLUMN_NUM);
columnNamesToNumMap.put(VALUE_COLUMN, VALUE_COLUMN_NUM);
}
}

propertyList = new PropertyList();
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/net/ggtools/grand/ui/buildnum.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 14be43e

Please sign in to comment.