Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] How to integrate code generator into DLTK framework?


  the dltk core provides an implementation of an IncrementalBuilder, it's class name is ScriptBuilder.

  the dltk core also provides an extension point for the IScriptBuilder interface - if you implement this and define the proper extension point, any time the ScriptBuilder is called, your IScriptBuilder interface should also be called.

ie:

   <extension
         id="perlipseBuilder"
         name="Perlipse Builder"
         point="org.eclipse.dltk.core.builder">
      <builder
            class=" org.perlipse.core.PerlipseScriptCompiler"
            nature="org.perlipse.core.perlipseNature">
      </builder>
   </extension>

 as long as the 'Script Builder' shows up in the list of builders for the project, it will fire. if you don't see the 'Script Builder' appear in that list, make sure that your project's nature extends ScriptNature. if it does/did not, you will need to check the .project file for the project to make sure that the 'ScriptBuilder' is listed for it.

On Nov 10, 2007 7:10 PM, Gerald Rosenberg <gerald@xxxxxxxxxx> wrote:
Very strange.  Not only does ScriptBuilder not implement IScriptBuilder, but an empty implementation of an interface (IScriptBuilder) results in a running builder -- no IncrementalBuilder in evidence! 

Thanks for your help, Jae.

Gerald



At 02:59 PM 11/10/2007, you wrote:

  i did try validating, but that did not catch my problem. *shrug*

  in any case, if you are extending the IScriptBuilder interface, your builder won't appear in the list, only the ScriptBuilder will (i'd like to see that change in the future).

  from your error message, it seems that you aren't implementing the IScriptBuilder interface, b/c that's what the dltk core code is trying to cast too.

  the changes i committed were in reference to my perlipse project, which you can access here: http://perlipse.googlecode.com
 
  all the dltk committers are on this list.

On Nov 10, 2007 5:50 PM, Gerald Rosenberg < gerald@xxxxxxxxxx> wrote:
The Builders property page displays, but does not list my builder.

I am launching with all workspace plugins enabled (FWIW, validate should discover what you are missing). 

When I add the nature that my builder is associated with, I get this error:

!ENTRY org.eclipse.core.resources 4 2 2007-11-10 14:40:05.515
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.ClassCastException: net.certiv.antlrdt.internal.core.builder.AntlrGrammarBuilder
at org.eclipse.dltk.internal.core.builder.ScriptBuilderManager.processNature( ScriptBuilderManager.java:95)
at org.eclipse.dltk.internal.core.builder.ScriptBuilderManager.getScriptBuilders( ScriptBuilderManager.java :67)
at org.eclipse.dltk.internal.core.builder.ScriptBuilderManager.getAllScriptBuilders( ScriptBuilderManager.java :117)
at org.eclipse.dltk.internal.core.builder.ScriptBuilder.findDependencies( ScriptBuilder.java :394)
at org.eclipse.dltk.internal.core.builder.ScriptBuilder.incrementalBuild( ScriptBuilder.java :280)
at org.eclipse.dltk.internal.core.builder.ScriptBuilder.build( ScriptBuilder.java :171)
at org.eclipse.core.internal.events.BuildManager$2.run( BuildManager.java :624)

In the debugger, I cannot see the cause of the CCE.  My nature does extend ScriptNature.

Where are you committing.  A branch of the public CVS?  Happy to take a look at what you are doing to compare notes.

BTW, are the Ruby and TCL committers, on this list, or another?

Thanks,
Gerald



At 01:24 PM 11/10/2007, you wrote:

  i haven't done any work on trying to get a formatter to work, so i'm going to have to defer that question.

  as for the builders, did you check to make sure that you actually have builders enabled? i created an IScriptBuilder implementation to start investigating automatically compiling the code on saves, but it wasn't firing. for some reason, the 'Builders' property page wasn't showing up for the project's properties.

  could you check to see if this is the case for you? if so, you're missing some plugins that your pde runtime needs for that page to display and the builders to work - but unfortunately, i'm not 100% sure what exactly is missing. i can mail you a copy of my launch config so you can check it out to compare if that is your issue.

  if not, i just committed some of the work i did for the builder, but it is not enabled in the plugin.xml, however it should be enough to double check your work against.

  let me know if you've got questions.

On Nov 10, 2007 4:14 PM, Gerald Rosenberg <gerald@xxxxxxxxxx> wrote:
Editor is running well on the new DLTK 1.0M3 codebase.
Having trouble understanding how to do a few things the "DLTK" way:
1) Formatters: I have implemented SourceViewerConfigurations# getContentFormatter(), but do not see what more needs to be done to make the formatters available/functional in the editor.  A quick list of the essential steps needed to integrate a custom content formatter into the DLTK framework would be appreciated.
2) Builders:  my editor is setup to edit a grammar specification that needs to be fed to an existing code generator.  I have tried creating an implementation of ScriptBuilder, but it is not being called in response to any editor actions/operations.  Again, a quick list of essential steps needed to enable an incremental builder would be appreciated.
I have gone through the Ruby, Lua, and Perlipse code bases, but evidently missing how they do these two thing.
Thanks,
Gerald


----
Gerald B. Rosenberg
Certiv Analytics

www.certiv.net
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae
_______________________________________________

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae

Back to the top