wiki:Grits_Classes_3_x_to_E4

Version 4 (modified by shan, 6 years ago) (diff)

--

Change in available classes and methods from core plugin

Classes (and their methods) that are not available

ProjectExplorerView

ProjectExplorerView class (org.grits.toolbox.core.projectexplorer.view.ProjectExplorerView) replaced with ProjectExplorerPart class (org.grits.toolbox.core.projectexplorer.part.ProjectExplorerPart)

Fixing your plugin

3.x plugins

ProjectExplorerView.getClickedEntry() returned the last selected entry for the project explorer view , even if this view was not active.

  • Replace ProjectExplorerView.getClickedEntry() with using DataModelHandler.getLastSelection() and getting entry from it
    • returns a StructuredSelection which can be used to retrieve the last selected entry from the data model

Example code :

	if(selectedEntry == null
			&& gritsDataModelService.getLastSelection().getFirstElement() instanceof Entry)
	{
		selectedEntry = (Entry) gritsDataModelService.getLastSelection().getFirstElement();
	}

Deprecated Classes and methods

DataModelHandler

  • uses IGritsDataModelService internally

PropertyHandler

  • uses IGritsDataModelService internally
  • root workspace entry is also injected to appplication

EditorHandler

  • only for 3.x plugins