Skip to content

Commit

Permalink
Fix #1781 package json (#1979)
Browse files Browse the repository at this point in the history
* Fix weird error about dynamic diagram icon

* Fix #1781 -> replace WOLLOK.ROOT by package.json
  • Loading branch information
fdodino committed Dec 13, 2020
1 parent 24e1afc commit 1183b94
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import org.eclipse.xtext.validation.CheckMode
import org.eclipse.xtext.validation.IResourceValidator
import org.eclipse.xtext.validation.Issue
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1
import org.uqbar.project.wollok.Wollok
import org.uqbar.project.wollok.WollokConstants
import org.uqbar.project.wollok.interpreter.WollokTestsFailedException
import org.uqbar.project.wollok.interpreter.nativeobj.WollokNumbersPreferences
import org.uqbar.project.wollok.launch.setup.WollokLauncherSetup
import org.uqbar.project.wollok.validation.WollokDslValidator
import org.uqbar.project.wollok.wollokDsl.WFile
import org.uqbar.project.wollok.interpreter.WollokTestsFailedException

/**
* Wollok checker program.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import com.google.gson.stream.JsonWriter
import java.io.PrintWriter
import java.util.List
import org.eclipse.emf.common.util.URI
import org.uqbar.project.wollok.Wollok
import org.uqbar.project.wollok.interpreter.core.WollokObject
import org.uqbar.project.wollok.interpreter.core.WollokProgramExceptionWrapper
import org.uqbar.project.wollok.launch.Wollok
import org.uqbar.project.wollok.launch.tests.WollokTestsReporter
import org.uqbar.project.wollok.wollokDsl.WFile
import org.uqbar.project.wollok.wollokDsl.WTest
import wollok.lib.AssertionException

import static extension org.uqbar.project.wollok.utils.XtendExtensions.*
import static extension org.uqbar.project.wollok.ui.utils.XTendUtilExtensions.*
import static extension org.uqbar.project.wollok.lib.WollokSDKExtensions.*
import org.uqbar.project.wollok.interpreter.core.WollokObject
import static extension org.uqbar.project.wollok.ui.utils.XTendUtilExtensions.*
import static extension org.uqbar.project.wollok.utils.XtendExtensions.*

/**
* A test reporter that prints to console in JSON format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package org.uqbar.project.wollok.launch.tests.json
import java.io.PrintWriter
import java.util.List
import org.eclipse.xtext.validation.Issue
import org.uqbar.project.wollok.launch.Wollok
import org.uqbar.project.wollok.Wollok
import org.uqbar.project.wollok.launch.WollokLauncherIssueHandler
import org.uqbar.project.wollok.server.JSonWriter

import static extension org.uqbar.project.wollok.server.JSonWriter.*

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.handler.AbstractHandler
import org.eclipse.xtext.resource.IResourceFactory
import org.eclipse.xtext.resource.XtextResourceSet
import org.uqbar.project.wollok.Wollok
import org.uqbar.project.wollok.WollokConstants
import org.uqbar.project.wollok.interpreter.WollokInterpreter
import org.uqbar.project.wollok.interpreter.core.WollokObject
import org.uqbar.project.wollok.interpreter.core.WollokProgramExceptionWrapper
import org.uqbar.project.wollok.launch.Wollok
import org.uqbar.project.wollok.launch.WollokChecker
import org.uqbar.project.wollok.launch.WollokLauncherInterpreterEvaluator
import org.uqbar.project.wollok.launch.WollokLauncherParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class AbstractWollokInterpreterTestCase extends Assert {
WDate.FORMATTER = DateTimeFormatter.ofPattern("d/M/yy")

new File("target/test-files").mkdirs
new File("target/test-files/WOLLOK.ROOT").createNewFile
new File("target/test-files/package.json").createNewFile
}

@After
Expand Down
2 changes: 1 addition & 1 deletion org.uqbar.project.wollok.ui.diagrams/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<view
category="org.uqbar.project.wollok.ui.diagrams.category"
class="org.uqbar.project.wollok.ui.diagrams.classes.WollokDslExecutableExtensionFactory:org.uqbar.project.wollok.ui.diagrams.dynamic.DynamicDiagramView"
icon="icons/object_diagram_icon.png"
icon="icons/object_diagram_icon3.png"
id="org.uqbar.project.wollok.ui.diagrams.object"
name="%dynamicDiagramView"
restorable="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
@SuppressWarnings("restriction")
public class WollokViewerFilter extends ViewerFilter {
private List<String> hiddenFiles = Arrays.asList("build.properties", "log4j.properties", "WOLLOK.ROOT");
private List<String> hiddenFiles = Arrays.asList("build.properties", "log4j.properties", "package.json");
private List<String> hiddenFolders = Arrays.asList("META-INF", "OSGI-INF");
private List<String> hiddenProjects = Arrays.asList("__EMPTY__");
private List<Class<?>> hiddenClasses = Arrays.<Class<?>>asList(LibraryContainer.class, ClassPathContainer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
«ENDFILE»

«FILE "src/WOLLOK.ROOT"-»
wollokRoot
«FILE "package.json"-»
{
"name": "«projectName»",
"version": "1.0.0",
"wollokVersion": "«version»",
"author": "«author»",
"license": "ISC"
}
«ENDFILE»

«ENDDEFINE»
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package org.uqbar.project.wollok.ui.wizard;

import org.uqbar.project.wollok.Wollok;

public class WollokDslProjectInfo extends org.eclipse.xtext.ui.wizard.DefaultProjectInfo {


public String getVersion() { return Wollok.VERSION; }

public String getAuthor() { return System.getProperty("user.name"); }
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.uqbar.project.wollok.launch
package org.uqbar.project.wollok

/**
* @author jfernandes
Expand All @@ -8,4 +8,4 @@ class Wollok {

public static val VERSION = "2.0.2"

}
}

0 comments on commit 1183b94

Please sign in to comment.