Archive for the 'Eclipse' Category

Opening a Marker in an Eclipse Java Editor

Markers are a great feature of Eclipse and there are some great articles on creating Markers. However, I couldn’t find a good article on opening markers in an editor. So, here’s the best call sequence that I could figure out:

IJavaElement element = ...;
IEditorInput input = EditorUtility.getEditorInput(element);
IEditorPart editor = getSite().getPage().openEditor(input,
    (input instanceof FileEditorInput) ? : JavaUI.ID_CU_EDITOR 
            : JavaUI.ID_CF_EDITOR);
IDE.gotoMarker(editor, sNode.getMarker());

EditorUtility is an internal JDT class, but I couldn’t find a better way of doing this. A check on the return type of the getEditorInput call is necessary to since it can return either a file editor (for compilation units) or a class file editor.

fmp 0.7.0 Development Release

fmp 0.7.0 Screenshot

I’ve been doing some development on the feature modeling plug-in during the past week and have implemented several new features and bug fixes (shown below).

I’m releasing the plug-in as a development release, for now. I have started rewriting the configuration backend, but my thesis deadline is fast approaching and I will not have enough time to complete the changes in fmp. In any case, please let me know of any bugs you find, or if you have a feature request. The source code is also included in the plug-in, so feel free to hack away at it yourself if you are inclined. When the plug-in is sufficiently tested, I will merge this branch into the trunk of the CVS repository on SourceForge. Give it a try!

New Features

  • New, more robust and featureful constraint view.
  • Constraints are shown for the feature hierarchy in addition to additional constraints.
  • When a configuration is selected in the feature model editor, the constraints are evaluated and the status of each constraint is shown (ie. satisfied or not satisfied).
  • Support for arbitrary propositional formulas when writing additional constraints. NOTE: constraints are written using node Id instead of an XPath expression. However, feature models created using fmp 0.6.6 are compatible, but will require re-writing the constraints using the new grammar. See below for examples.
  • Ability to view Node Ids next to feature names in the feature model.
  • Constraint input validation.
  • Constraint resolution. An unsatisfied constraint can be resolved in a configuration by right-clicking and selecting ‘Resolve Constraint’.

Installation

Project Homepage: http://gsd.uwaterloo.ca/projects/fmp-plugin/fmp-070/