Skip to content

Commit ffcd855

Browse files
committed
Issue #14 - Part 1 (constructor setting default library) resolved.
1 parent 670a0fb commit ffcd855

File tree

14 files changed

+83943
-83975
lines changed

14 files changed

+83943
-83975
lines changed

org.modeldriven.alf.eclipse.papyrus/src/org/modeldriven/alf/eclipse/papyrus/execution/Alf.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,7 @@ protected void configure() {
123123
}
124124
}
125125

126-
public Alf() {
127-
super();
128-
}
129-
130-
public Alf(String[] args) {
131-
super(args);
132-
}
133-
134126
public static void main(String[] args) {
135-
new Alf(args);
127+
new Alf().run(args);
136128
}
137129
}

org.modeldriven.alf.eclipse/UML/_RunTests.uml

Lines changed: 83907 additions & 83907 deletions
Large diffs are not rendered by default.
18 Bytes
Binary file not shown.

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/fuml/execution/AlfCompiler.java

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
import org.eclipse.emf.ecore.resource.Resource;
1919

2020
public class AlfCompiler extends org.modeldriven.alf.fuml.execution.AlfCompiler {
21+
22+
public static final String DEFAULT_UML_DIRECTORY = "UML";
2123

22-
protected String umlDirectory;
24+
protected String umlDirectory = DEFAULT_UML_DIRECTORY;
2325

2426
protected void setUmlDirectory(String umlDirectory) {
2527
this.umlDirectory = umlDirectory;
@@ -81,37 +83,29 @@ protected void parseOptionWithArg(String option, String arg) {
8183
}
8284
}
8385

84-
@Override
85-
protected void configure() {
86-
super.configure();
87-
this.umlDirectory = "UML";
88-
this.getRootScopeImpl().setLibraryDirectory("Libraries");
89-
}
90-
9186
@Override
9287
protected void printUsage() {
9388
this.println("Usage is");
9489
this.println(" alfc [options] unit");
9590
this.println("where unit is the qualified name of an Alf unit and");
9691
this.println("allowable options are:");
9792
this.println(" -f Treat unit as a file name rather than a qualifed name");
98-
this.println(" -l path Set library directory path (default is \"Libraries\")");
99-
this.println(" -m path Set model directory path (default is \"Models\")");
93+
this.println(" -l path Set library directory path (default is \"" +
94+
RootNamespaceImpl.DEFAULT_LIBRARY_DIRECTORY + "\")");
95+
this.println(" -m path Set model directory path (default is \"" +
96+
RootNamespaceImpl.DEFAULT_MODEL_DIRECTORY + "\")");
10097
this.println(" -p Parse and constraint check only");
10198
this.println(" -P Parse, constraint check and print abstract syntax tree");
102-
this.println(" -u path Set UML output directory path (default is \"UML\")");
99+
this.println(" -u path Set UML output directory path (default is \"" +
100+
DEFAULT_UML_DIRECTORY + "\")");
103101
this.println(" -v Set verbose mode (if used alone without unit, prints version info)");
104102
}
105103

106104
public AlfCompiler() {
107105
super();
108106
}
109107

110-
public AlfCompiler(String[] args) {
111-
super(args);
112-
}
113-
114108
public static void main(String[] args) {
115-
new AlfCompiler(args);
109+
new AlfCompiler().run(args);
116110
}
117111
}

org.modeldriven.alf.eclipse/src/org/modeldriven/alf/eclipse/fuml/execution/test/CompileTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void compileTest(String unitName) {
3030

3131
try {
3232
args[args.length-1] = unitName;
33-
new AlfCompiler(args);
33+
new AlfCompiler().run(args);
3434
} catch (Exception e) {
3535
e.printStackTrace();
3636
}

org.modeldriven.alf.fuml.impl/src/org/modeldriven/alf/fuml/impl/execution/Alf.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,7 @@ private void createSystemService (
113113
}
114114
}
115115

116-
public Alf() {
117-
super();
118-
}
119-
120-
public Alf(String[] args) {
121-
super(args);
122-
}
123-
124116
public static void main(String[] args) {
125-
new Alf(args);
117+
new Alf().run(args);
126118
}
127119
}

org.modeldriven.alf.fuml.impl/src/org/modeldriven/alf/fuml/impl/units/ModelNamespaceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2013 Ivar Jacobson International SA
2+
* Copyright 2016 Data Access Technologies, Inc. (Model Driven Solutions)
33
* All rights reserved worldwide. This program and the accompanying materials
44
* are made available for use under the terms of the GNU General Public License
55
* (GPL) version 3 that accompanies this distribution and is available at

org.modeldriven.alf.fuml.impl/src/org/modeldriven/alf/fuml/impl/units/RootNamespaceImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2015 Data Access Technologies (Model Driven Solutions)
2+
* Copyright 2015-2016 Data Access Technologies (Model Driven Solutions)
33
* All rights reserved worldwide. This program and the accompanying materials
44
* are made available for use under the terms of the GNU General Public License
55
* (GPL) version 3 that accompanies this distribution and is available at
@@ -25,7 +25,6 @@ public class RootNamespaceImpl extends org.modeldriven.alf.fuml.units.RootNamesp
2525

2626
public RootNamespaceImpl() {
2727
super(RootNamespace.getRootScope());
28-
super.setLibraryDirectory("Libraries");
2928
}
3029

3130
public void setContext(fUML.Syntax.Classes.Kernel.Element contextElement) {
18 Bytes
Binary file not shown.

org.modeldriven.alf/src/org/modeldriven/alf/fuml/execution/Alf.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.modeldriven.alf.fuml.mapping.units.ClassifierDefinitionMapping;
2121
import org.modeldriven.alf.fuml.mapping.units.DataTypeDefinitionMapping;
2222
import org.modeldriven.alf.fuml.mapping.units.OperationDefinitionMapping;
23+
import org.modeldriven.alf.fuml.units.RootNamespaceImpl;
2324
import org.modeldriven.alf.mapping.Mapping;
2425
import org.modeldriven.alf.mapping.MappingError;
2526
import org.modeldriven.alf.syntax.common.ElementReference;
@@ -236,19 +237,13 @@ protected void printUsage() {
236237
this.println(" -d OFF|FATAL|ERROR|WARN|INFO|DEBUG|ALL");
237238
this.println(" Set debug logging level (default is as configured)");
238239
this.println(" -f Treat unit as a file name rather than a qualifed name");
239-
this.println(" -l path Set library directory path (default is \"Libraries\")");
240-
this.println(" -m path Set model directory path (default is \"Models\")");
240+
this.println(" -l path Set library directory path (default is \"" +
241+
RootNamespaceImpl.DEFAULT_LIBRARY_DIRECTORY + "\")");
242+
this.println(" -m path Set model directory path (default is \"" +
243+
RootNamespaceImpl.DEFAULT_MODEL_DIRECTORY + "\")");
241244
this.println(" -p Parse and constraint check only");
242245
this.println(" -P Parse, constraint check and print abstract syntax tree");
243246
this.println(" -v Set verbose mode (if used alone without unit, prints version info)");
244247
}
245248

246-
public Alf() {
247-
super();
248-
}
249-
250-
public Alf(String[] args) {
251-
super(args);
252-
}
253-
254249
}

0 commit comments

Comments
 (0)