Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New groovy output #52

Closed
wants to merge 26 commits into from
Closed

Conversation

adrbessy
Copy link
Contributor

@adrbessy adrbessy commented Jan 3, 2022

A Groovy Output that prints in the same way that the GroovyConsole.
There is a button allowing to delete its content.

@@ -19,6 +19,7 @@ Bundle-Activator: org.orbisgis.core.CoreActivator
Bundle-ActivationPolicy: lazy
Export-Package: org.orbisgis.core,
org.orbisgis.core.logger,
org.orbisgis.core.service.definition,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be removed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

#BRANCH: p2-repository # The branch name where you want to push the assets
#FOLDER: ./p2/target/p2-1.0.0-SNAPSHOT # The directory where your assets are generated
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
#MESSAGE: "Build: plugins available from p2-repository" # The commit message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The p2-1.0.0-SNAPSHOT cannot be pushed to p2-repository,
There is this message:
remote: Permission to orbisgis/orbisrcp.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/orbisgis/orbisrcp.git/': The requested URL returned error: 403

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SPalominos could you check when you will have the time ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the GITHUB_TOKEN already active ?

@@ -97,7 +105,7 @@ public void mouseHover(MouseEvent e) {

this.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
public void mouseDown(MouseEvent e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove blank space.
You can used format with the ide

@@ -21,4 +21,6 @@ Require-Bundle: org.eclipse.core.runtime,
dependencies
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.orbisgis.ui.editors.groovy.GroovyActivator

Import-Package: org.jkiss.dbeaver.core,
org.jkiss.dbeaver.ext.sample.database,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

necessary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no!

@@ -41,21 +54,40 @@
description="Clear the script"
id="org.orbisgis.ui.editors.groovy.clear"
name="Clear script"> </command>
<!--
<command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it

import org.orbisgis.ui.editors.groovy.GroovyEditor;
import org.orbisgis.ui.editors.groovy.GroovyUtils;

public class OpenHandler extends AbstractHandler {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add author
Adrien Bessy, LAB-STICC, CNRS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is never used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class allows to open a web page in the software, but we don't use it.


private void createDeleteOutputButton(Composite group) {
final MenuManager menuMgr = new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format the code with the IDE

@@ -140,4 +145,18 @@ public void stop(){
public GroovyJob getRunningJob() {
return job;
}

public void changeGroovyInterpreter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used ?

LOGGER.info("GroovyScriptEngine is now selected.");
} else {
this.groovyInterpreter = "GroovyShell";
System.out.println("\n***\n groovyInterpreter in changeGroovyInterpreter method : " + groovyInterpreter + "\n***\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove println

super(name);
this.script = script;
this.name = name;

System.out.println("\n***\n in GroovyJob constructor \n***\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't used any println in the code, use log system if necessary

#BRANCH: p2-repository # The branch name where you want to push the assets
#FOLDER: ./p2/target/p2-1.0.0-SNAPSHOT # The directory where your assets are generated
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
#MESSAGE: "Build: plugins available from p2-repository" # The commit message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SPalominos could you check when you will have the time ;-)

}
Object res3 = shell.getProperty("out");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format code

#BRANCH: p2-repository # The branch name where you want to push the assets
#FOLDER: ./p2/target/p2-1.0.0-SNAPSHOT # The directory where your assets are generated
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
#MESSAGE: "Build: plugins available from p2-repository" # The commit message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the GITHUB_TOKEN already active ?

@@ -21,4 +21,4 @@ Require-Bundle: org.eclipse.core.runtime,
dependencies
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.orbisgis.ui.editors.groovy.GroovyActivator

Import-Package: org.jkiss.dbeaver.registry.driver
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed ?


public GroovyJob(String name, String script){
public GroovyJob(String name, String script, String groovyInterpreter){
Copy link
Member

@ebocher ebocher Jan 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you set a String argument to define the groovy engine.
I think you can remove it and use the original code. No ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants