Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cobol-dev] Adding a pre-compiler builder to FJCOBOLNature

Title: Adding a pre-compiler builder to FJCOBOLNature

Hi

My question is, how a pre-compiler builder can be added to the
com.fujitsu.netcobol.ui.examples.FJCOBOLNature.

My first intension was, that it should be enough to just define a new
   <extension point="org.eclipse.cobol.core.buildtool">.
I assumed, that this builder should then appear when in the project properties under
"Build Tools" the "Add Build Tool" Button is pressed. However, as I learned soon,
this does not work.


The solution I found is:
-> Define a new CobolContributor
   - nature is FJCOBOLNature
   - class is FJCOBOLContributor
   - reference a new targetapplicationtype
-> Define the new targetapplicationtype
   - copy the one from the com.fujitsu.netcobol.ui.examples plugin
     and add the desired precompiler
-> Define the precompiler buildTool
-> Implement the precompiler buildTool class.


>>>>>
Question 1:
- Is this the way it should be done
<<<<<

I then looke a little deeper into the code for the BuildTools property page,
since I wanted to figure out, how a build tool can appear in the displayed
list after the "Add Build Tool"-button is pressed.

The class BuildToolsSettingPropertyPage shows the list of configured builders.
The configured Builders are found in the defintion of the selected targetapplicationtype.
When the "Add Build Tool"-button is pressed, an instance of AddBuildToolsDialog
is instantiated. This instance is filled with the same builders, which are
actually already displayed in the BuildToolsSettingPropertyPage. After
the initialization of AddBuildToolsDialog, the method filterElements()
is called. This method seems to remove all builders, which are already
present in the BuildToolsSettingPropertyPage -> since, this was the
origin, all elements are removed, and therefore the list ist empty.?!

I did another test. I defined my pre-compiler as [necessary="false"].
I created a new project, displayed the properties, and I removed
the precompiler in the BuildToolsSettingPropertyPage. After that,
there is no way to add it again.

>>>>>
Question 2:
- Is this a bug inside the eclipse cobol framework?

Question 3:
- if answer to question 2 is no
  - how is it possible to see an entry inside the "Add Build Tool" - List?
  - how is it possible to add a removed builder again?
<<<<<

I would really appreciate, if somebody of the "Eclipse Cobol Framework"
developer could answer my questions.

Thanks in advance

Hansjoerg


Back to the top