czwartek, 29 października 2015

How to write minimal Rest client with

poniedziałek, 12 października 2015

[PDE] How to find out all plugins that given extension point is used

There are two ways to do so from PDE UI level. First is by opening "Open Plug-in Artifact" view (Ctrl + Shift + A) - technically class.

Once you type "expressions.propertyTesters" in filter box and deselect all but "Show Extension" item hidden under black triangle on the right, the matching items will contain all plugins are using "org.eclipse.core.expressions.propertyTesters" extension point.

The another way is using default Search Dialog (Ctrl + H). The last tab is "Plug-in Search".

  • Search For: Extension Point
  • Limit To: References
This time you need type fully qualified id or use wild card (*expressions.propertyTesters)

niedziela, 11 października 2015

How to programmatically open ProblemsView in Eclipse

In order to open up a default "Problem View" view we need invoke showView method of on IViewPart instance. Here you are little snippet opening view as a separate job.
Job job = new Job("Opening problems view") {
 protected IStatus run(IProgressMonitor monitor) {
  IWorkbench workbench = PlatformUI.getWorkbench();
  try {
  } catch (PartInitException e) {
  return Status.OK_STATUS;

czwartek, 8 października 2015

How to make active waiting in separate thread

final ScheduledExecutorService newScheduledThreadPool = Executors.newScheduledThreadPool(1);
newScheduledThreadPool.scheduleAtFixedRate(new Runnable() {

 public void run() {
  boolean isExecutionDone = false;
  try {
                    isExecutionDone = checkIfExecutionIsDone();
  } finally {
   if (isExecutionDone) {

}, 1, 1, TimeUnit.SECONDS);