Nice TWiki > Dev > EclipsePlugin (r1.13) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Dev . { Changes | Index | Search | Go }
On this page the Nice Eclipse Plug-in is described

The Plug-in's progress

Download

The plug-in consists of two plugins:

the downloadable jar contains the two folders. you can download here:
nice_plugin

Install

Put nice plugins in the %eclipse_home%/plugins folder and restart eclipse.

Troubleshooting

If you experience an unexpected behaviour sheck the following by Menu Help > About Eclipse Platform >

-- AlexGreif - 08 Jun 2003

Documentation

You can find a fast intro on the exclipse workbench at worbench_userguide.pdf

User feedback

I just tried the plugin. Installation was very easy! I could create a new project, a new folder hello, and a file hello.nice. To go farther, I would need to be able to compile my project! :-)

Question:
If I understand well, a perspective is a set of windows that fill the screen at some point. The Nice perspective has "Nice resources" and the text editor. Note that when I created a Nice project, it did not switch automatically to the Nice perspective. Is this normal? -- DanielBonniot - 10 Jun 2003

Answer:
I will investigate how to set the default perspective. -- AlexGreif - 12 Jun 2003

Question:
In the "resource" perspective, there is a "task" window. That's where compilation errors will go in the future, right? -- DanielBonniot - 10 Jun 2003

Answer:
In the first drop we will present all compiler output in a console window. But later, yes the task view will list all errors and warnings... and the user can then double-click the error and lands in the appropriate line. -- AlexGreif - 12 Jun 2003

Question:
How will this work in a multi-language project (say, Nice and Java, like in the Nice compiler source)? The source files will be opened in different editors, depending on the extension? -- DanielBonniot - 10 Jun 2003

Answer:
Yes, in the Nice-Project, that can contain diffferent file types, always the appropriate editor is opened. -- AlexGreif - 12 Jun 2003

Question:
If I write an ant build file for that project, will it be possible that compile errors are parsed correctly, depending on whether they come from javac and nicec?

Answer:
all errors should land in the task view, independently from which compiler. This is the desired solution. Isn't it? -- AlexGreif - 12 Jun 2003

Question:
Does eclipse support Makefile too?

Answer:
I dont know, we have to look :) -- AlexGreif - 12 Jun 2003

I know, these are advanced features. I'm just curious. For the moment, support for Nice-only projects would already be great. Keep up the good work! -- DanielBonniot - 10 Jun 2003


This plugin is a good reason for me to try out eclipse. -- ArjanB

Development

CompilationListener

One improvement I want to make to the compiler interface is to create a CompilationListener interface. It would receive messages that describe how the compilation is going. Incidentally, I will completely separate the console compiler in nice.tools.compiler.console. The package nice.tools.compiler will only hold the high-level, java/nice compilation api.

A first idea for the listener is:

interface CompilationListener
{
  error  (Location location, String message);
  warning(Location location, String message);

  /** Reports the progress of compilation.
      phase can be: parsing, type-checking, generating code, ...
      the package can be null if the phase applies to the whole program (testing dispatch, creating the archive, compiling to native code, ...).
  */
  progress(?String package, String phase);
}
Comments?

I might work on this today.

-- DanielBonniot - 11 Jun 2003

I would add a method "message(String)" for general messages.

ASAIK other compilers go the other way:

interface CompilationListener {
  message(CompilationMessage);
}

class CompilationMessage {
  String getText()
}

class Error extends CompilationMessage {
  int getLine();
}

class Warning extends CompilationMessage {
 int getLine()
}

class Progress extends CompilationMessage {
  String getPackage();
}

-- AlexGreif - 12 Jun 2003

AST

Looks useful to me. By the way, does the compiler offer a convenient way of obtaining the AST? Do we have a pretty-printer that will generate Nice source code from the AST? These could be important for this plugin (or others), if we want to support automated refactoring operations.

-- BrynKeller - 11 Jun 2003

No, the compiler offer no easy way to obtain the AST. And pretty-printing is only very limited because it's only used for creating *.nicei files. Both things could easily be implemented once the bossa.syntax package is completely converted to Nice. -- ArjanB

Syntax Highlighting

If you need it, I want to help the syntax highlighting since I familiar with the grammar of Nice and I have some time. -- ArjanB

We have to collect ideas how to realize syntax highlighting. My suggestion is

I think the first suggestion is better, because we let the nice parser determine which words are highlighted. On the other hand we have to measure how performant on the fly parsing is.

Maybe there is a way in eclipse to parse only the relevant parts of the edited document, and not the whole file all the time. -- AlexGreif - 12 Jun 2003

Compiler Invocation

In the first run I will embed the nice.jar in the temporary (net.sf.nice.compile) plugin. This makes it fast to implement the plugin proto. If we get more experience how to handle only one nice.jar on the whole system, we will get rid of this temp plugin.

-- AlexGreif - 12 Jun 2003

Topic EclipsePlugin . { Edit | Attach | Ref-By | Printable | Diffs | r1.35 | > | r1.34 | > | r1.33 | More }
Revision r1.13 - 12 Jun 2003 - 07:57 GMT - AlexGreif
Parents: WebHome
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.