Revision: 4786 http://sourceforge.net/p/jump-pilot/code/4786 Author: michaudm Date: 2016-01-13 22:31:29 +0000 (Wed, 13 Jan 2016) Log Message: ----------- Code cleaning (removing dead code)
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java core/trunk/src/org/openjump/OpenJumpConfiguration.java core/trunk/src/org/openjump/core/ui/SelectionStyllingOptionsPanel.java core/trunk/src/org/openjump/core/ui/plugin/datastore/DataStoreDataSourceFactory.java core/trunk/src/org/openjump/core/ui/plugin/datastore/RefreshDataStoreQueryPlugIn.java core/trunk/src/org/openjump/sigle/plugin/joinTable/JoinTableDataSourceCSV.java core/trunk/src/org/openjump/swing/list/LabelListCellRenderer.java core/trunk/src/org/openjump/util/XPathUtils.java core/trunk/src/org/openjump/util/metaData/MetaInformationHandler.java core/trunk/src/org/openjump/util/python/ModifyGeometry.java Removed Paths: ------------- core/trunk/src/com/vividsolutions/jump/workbench/model/SystemLayerFinder.java.bak Modified: core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -41,42 +41,20 @@ import org.openjump.OpenJumpConfiguration; import org.openjump.core.ui.plugin.layer.LayerableStylePlugIn; -//import org.openjump.core.ui.plugin.edit.CopyBBoxPlugin; -//import org.openjump.core.ui.plugin.edit.InvertSelectionPlugIn; -//import org.openjump.core.ui.plugin.layer.CombineSelectedLayersPlugIn; -//import org.openjump.core.ui.plugin.layer.LayerPropertiesPlugIn; -//import org.openjump.core.ui.plugin.mousemenu.DuplicateItemPlugIn; -//import org.openjump.core.ui.plugin.mousemenu.MergeSelectedFeaturesPlugIn; -//import org.openjump.core.ui.plugin.mousemenu.PasteItemsAtPlugIn; -//import org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneDown; -//import org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryOneUp; -//import org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryToBottom; -//import org.openjump.core.ui.plugin.mousemenu.category.MoveCategoryToTop; -//import org.openjump.core.ui.plugin.mousemenu.category.SetCategoryVisibilityPlugIn; import org.openjump.core.ui.plugin.tools.AdvancedMeasureOptionsPanel; import org.openjump.core.ui.plugin.tools.AdvancedMeasureTool; import org.openjump.core.ui.plugin.tools.ZoomRealtimeTool; -//import org.openjump.core.ui.plugin.view.ShowScalePlugIn; import org.openjump.core.ui.plugin.view.SuperZoomPanTool; -//import org.openjump.core.ui.plugin.view.helpclassescale.InstallShowScalePlugIn; -//import org.openjump.core.ui.plugin.view.helpclassescale.ShowScaleRenderer; -//import org.openjump.core.ui.plugin.window.ArrangeViewsPlugIn; -//import org.openjump.core.ui.plugin.window.MosaicInternalFramesPlugIn; -//import org.openjump.core.ui.plugin.window.SynchronizationPlugIn; import com.vividsolutions.jts.util.Assert; import com.vividsolutions.jump.I18N; import com.vividsolutions.jump.workbench.model.Layer; import com.vividsolutions.jump.workbench.model.WMSLayer; import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn; -//import com.vividsolutions.jump.workbench.plugin.EnableCheck; import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory; import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck; import com.vividsolutions.jump.workbench.plugin.PlugIn; import com.vividsolutions.jump.workbench.plugin.PlugInContext; -//import com.vividsolutions.jump.workbench.ui.AttributeTab; -//import com.vividsolutions.jump.workbench.ui.GUIUtil; -import com.vividsolutions.jump.workbench.ui.LayerViewPanel; import com.vividsolutions.jump.workbench.ui.MenuNames; import com.vividsolutions.jump.workbench.ui.OptionsDialog; import com.vividsolutions.jump.workbench.ui.WorkbenchFrame; @@ -88,64 +66,13 @@ import com.vividsolutions.jump.workbench.ui.cursortool.QuasimodeTool; import com.vividsolutions.jump.workbench.ui.cursortool.SelectFeaturesTool; import com.vividsolutions.jump.workbench.ui.cursortool.editing.EditingPlugIn; -//import com.vividsolutions.jump.workbench.ui.images.IconLoader; -//import com.vividsolutions.jump.workbench.ui.plugin.AboutPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.AddNewCategoryPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.AddNewFeaturesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.AddNewLayerPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.AddWMSDemoBoxEasterEggPlugIn; import com.vividsolutions.jump.workbench.ui.plugin.ClearSelectionPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.CloneWindowPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.CombineSelectedFeaturesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.CopySchemaPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.DeleteAllFeaturesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.DeleteSelectedItemsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.DisposeSelectedLayersPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.EditSelectedFeaturePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.EditablePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.ExplodeSelectedFeaturesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.FeatureInfoPlugIn; import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; -//import com.vividsolutions.jump.workbench.ui.plugin.FirstTaskFramePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.GenerateLogPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.InstallStandardFeatureTextWritersPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.MapToolTipsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.MoveLayerablePlugIn; import com.vividsolutions.jump.workbench.ui.plugin.NewTaskPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.OptionsPlugIn; import com.vividsolutions.jump.workbench.ui.plugin.OutputWindowPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.PasteSchemaPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.PersistentBlackboardPlugIn; import com.vividsolutions.jump.workbench.ui.plugin.RedoPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.RemoveSelectedCategoriesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.SaveImageAsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.SaveProjectAsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.SaveProjectPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.SelectablePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.ShortcutKeysPlugIn; import com.vividsolutions.jump.workbench.ui.plugin.UndoPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.VerticesInFencePlugIn; import com.vividsolutions.jump.workbench.ui.plugin.ViewAttributesPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.ViewSchemaPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CopyImagePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CopySelectedItemsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CopySelectedLayersPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CopyThisCoordinatePlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CutSelectedItemsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.CutSelectedLayersPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.PasteItemsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.clipboard.PasteLayersPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.datastore.InstallDatastoreLayerRendererHintsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.datastore.RefreshDataStoreLayerPlugin; -//import com.vividsolutions.jump.workbench.ui.plugin.imagery.AddImageLayerPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.imagery.ImageLayerManagerPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.scalebar.InstallScaleBarPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.scalebar.ScaleBarPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.scalebar.ScaleBarRenderer; -//import com.vividsolutions.jump.workbench.ui.plugin.skin.InstallSkinsPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.wms.AddWMSQueryPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.wms.EditWMSQueryPlugIn; import com.vividsolutions.jump.workbench.ui.renderer.LayerRendererFactory; import com.vividsolutions.jump.workbench.ui.renderer.RenderingManager; import com.vividsolutions.jump.workbench.ui.renderer.WmsLayerRendererFactory; @@ -155,28 +82,17 @@ import com.vividsolutions.jump.workbench.ui.renderer.style.MetricsLineStringSegmentStyle; import com.vividsolutions.jump.workbench.ui.renderer.style.VertexIndexLineSegmentStyle; import com.vividsolutions.jump.workbench.ui.renderer.style.VertexXYLineSegmentStyle; -//import com.vividsolutions.jump.workbench.ui.snap.InstallGridPlugIn; import com.vividsolutions.jump.workbench.ui.snap.SnapToVerticesPolicy; -//import com.vividsolutions.jump.workbench.ui.style.CopyStylesPlugIn; -//import com.vividsolutions.jump.workbench.ui.style.PasteStylesPlugIn; import com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager; -//import com.vividsolutions.jump.workbench.ui.zoom.InstallZoomBarPlugIn; import com.vividsolutions.jump.workbench.ui.zoom.PanTool; -//import com.vividsolutions.jump.workbench.ui.zoom.ZoomBarPlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomNextPlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomPreviousPlugIn; -//import com.vividsolutions.jump.workbench.ui.zoom.ZoomToClickPlugIn; -//import com.vividsolutions.jump.workbench.ui.zoom.ZoomToCoordinatePlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomToFencePlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomToFullExtentPlugIn; -//import com.vividsolutions.jump.workbench.ui.zoom.ZoomToLayerPlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomToSelectedItemsPlugIn; import com.vividsolutions.jump.workbench.ui.zoom.ZoomTool; -//import com.vividsolutions.jump.workbench.datasource.AbstractSaveDatasetAsPlugIn; -//import com.vividsolutions.jump.workbench.datasource.InstallStandardDataSourceQueryChoosersPlugIn; -//import com.vividsolutions.jump.workbench.datasource.LoadDatasetPlugIn; -//import com.vividsolutions.jump.workbench.datasource.SaveDatasetAsPlugIn; + /** * Initializes the Workbench with various menus and cursor tools. Accesses the * Workbench structure through a WorkbenchContext. @@ -188,112 +104,12 @@ * located for iniatialization via reflection on this class */ -// private InstallShowScalePlugIn installShowScalePlugIn = new InstallShowScalePlugIn(); - -// private InstallScaleBarPlugIn installScaleBarPlugIn = new InstallScaleBarPlugIn(); -// -// private InstallGridPlugIn installGridPlugIn = new InstallGridPlugIn(); - - // FirstTaskFramePlugIn will be initialized using reflection in - // #initializePlugIns [Jon Aquino] -// private FirstTaskFramePlugIn firstTaskFramePlugIn = new FirstTaskFramePlugIn(); -// -// private InstallZoomBarPlugIn installZoomBarPlugIn = new InstallZoomBarPlugIn(); - -// private MoveLayerablePlugIn moveUpPlugIn = MoveLayerablePlugIn.UP; - -// private InstallStandardDataSourceQueryChoosersPlugIn installStandardDataSourceQueryChoosersPlugIn = new InstallStandardDataSourceQueryChoosersPlugIn(); -// -// private InstallStandardFeatureTextWritersPlugIn installStandardFeatureTextWritersPlugIn = new InstallStandardFeatureTextWritersPlugIn(); -// -// private ShortcutKeysPlugIn shortcutKeysPlugIn = new ShortcutKeysPlugIn(); - private ClearSelectionPlugIn clearSelectionPlugIn = new ClearSelectionPlugIn(); -// private EditWMSQueryPlugIn editWMSQueryPlugIn = new EditWMSQueryPlugIn(); - -// private MoveLayerablePlugIn moveDownPlugIn = MoveLayerablePlugIn.DOWN; - -// private AddWMSQueryPlugIn addWMSQueryPlugIn = new AddWMSQueryPlugIn(); -// -// private AddNewFeaturesPlugIn addNewFeaturesPlugIn = new AddNewFeaturesPlugIn(); -// -// private OptionsPlugIn optionsPlugIn = new OptionsPlugIn(); -// -// private AddNewCategoryPlugIn addNewCategoryPlugIn = new AddNewCategoryPlugIn(); -// -// private CloneWindowPlugIn cloneWindowPlugIn = new CloneWindowPlugIn(); -// -// private CopySelectedItemsPlugIn copySelectedItemsPlugIn = new CopySelectedItemsPlugIn(); -// -// private PasteItemsAtPlugIn pasteItemsAtPlugIn = new PasteItemsAtPlugIn(); -// -// private CopyThisCoordinatePlugIn copyThisCoordinatePlugIn = new CopyThisCoordinatePlugIn(); - -// private CopyImagePlugIn copyImagePlugIn = new CopyImagePlugIn(); - -// private MapToolTipsPlugIn toolTipsPlugIn = new MapToolTipsPlugIn(); -// -// private CopySelectedLayersPlugIn copySelectedLayersPlugIn = new CopySelectedLayersPlugIn(); -// -// private AddNewLayerPlugIn addNewLayerPlugIn = new AddNewLayerPlugIn(); -// -// private AddWMSDemoBoxEasterEggPlugIn addWMSDemoBoxEasterEggPlugIn = new AddWMSDemoBoxEasterEggPlugIn(); -// -// private EditSelectedFeaturePlugIn editSelectedFeaturePlugIn = new EditSelectedFeaturePlugIn(); - private EditingPlugIn editingPlugIn = EditingPlugIn.getInstance(); -// private EditablePlugIn editablePlugIn = new EditablePlugIn(editingPlugIn); -// -// private SelectablePlugIn selectablePlugIn = new SelectablePlugIn(); - - // [Michael Michaud 2007-03-23] Moved BeanShellPlugIn initialization in - // OpenJUMPConfiguration - // private BeanShellPlugIn beanShellPlugIn = new BeanShellPlugIn(); - -// private LoadDatasetPlugIn loadDatasetPlugIn = new LoadDatasetPlugIn(); -// private SaveDatasetAsPlugIn saveDatasetAsPlugIn = new SaveDatasetAsPlugIn(); - // [sstein 18.Oct.2011] Not needed anymore after fix for MacOSX bug 3428076 - // private SaveDatasetAsFilePlugIn saveDatasetAsFilePlugIn = new - // SaveDatasetAsFilePlugIn(); -// private SaveImageAsPlugIn saveImageAsPlugIn = new SaveImageAsPlugIn(); - -// private GenerateLogPlugIn generateLogPlugIn = new GenerateLogPlugIn(); - private NewTaskPlugIn newTaskPlugIn = new NewTaskPlugIn(); - // Moved to OpenJUMPConfigurationPlugIn - // private OpenProjectPlugIn openProjectPlugIn = new OpenProjectPlugIn(); - -// private PasteItemsPlugIn pasteItemsPlugIn = new PasteItemsPlugIn(); -// -// private PasteLayersPlugIn pasteLayersPlugIn = new PasteLayersPlugIn(); -// -// // Not necessary as we have "Delete Selected Items" -// private DeleteAllFeaturesPlugIn deleteAllFeaturesPlugIn = new DeleteAllFeaturesPlugIn(); -// -// private DeleteSelectedItemsPlugIn deleteSelectedItemsPlugIn = new DeleteSelectedItemsPlugIn(); -// -// private DisposeSelectedLayersPlugIn disposeSelectedLayersPlugIn = new DisposeSelectedLayersPlugIn(); -// -// private RemoveSelectedCategoriesPlugIn removeSelectedCategoriesPlugIn = new RemoveSelectedCategoriesPlugIn(); - -// private SaveProjectAsPlugIn saveProjectAsPlugIn = new SaveProjectAsPlugIn(); - -// private SaveProjectPlugIn saveProjectPlugIn = new SaveProjectPlugIn( -// saveProjectAsPlugIn); - -// private ShowScalePlugIn showScalePlugIn = new ShowScalePlugIn(); -// -// private ScaleBarPlugIn scaleBarPlugIn = new ScaleBarPlugIn(); -// -// private ZoomBarPlugIn zoomBarPlugIn = new ZoomBarPlugIn(); -// - //Giuseppe Aruta - June 3 2015 Deactivate and substituted by a General Layerable Styling plugin - // private DeeChangeStylesPlugIn changeStylesPlugIn = new DeeChangeStylesPlugIn(); - -//Giuseppe Aruta - June 3 2015 - General Layerable Styling plugin private LayerableStylePlugIn changeStylesPlugIn = new LayerableStylePlugIn(); private UndoPlugIn undoPlugIn = new UndoPlugIn(); @@ -302,71 +118,19 @@ private ViewAttributesPlugIn viewAttributesPlugIn = new ViewAttributesPlugIn(); -// private ViewSchemaPlugIn viewSchemaPlugIn = new ViewSchemaPlugIn( -// editingPlugIn); - -// private CopySchemaPlugIn copySchemaPlugIn = new CopySchemaPlugIn(); -// -// private PasteSchemaPlugIn pasteSchemaPlugIn = new PasteSchemaPlugIn(); -// -// private FeatureInfoPlugIn featureInfoPlugIn = new FeatureInfoPlugIn(); - private OutputWindowPlugIn outputWindowPlugIn = new OutputWindowPlugIn(); -// private VerticesInFencePlugIn verticesInFencePlugIn = new VerticesInFencePlugIn(); - private ZoomNextPlugIn zoomNextPlugIn = new ZoomNextPlugIn(); -// private ZoomToClickPlugIn zoomToClickPlugIn = new ZoomToClickPlugIn(0.5); - private ZoomPreviousPlugIn zoomPreviousPlugIn = new ZoomPreviousPlugIn(); private ZoomToFencePlugIn zoomToFencePlugIn = new ZoomToFencePlugIn(); -// private ZoomToCoordinatePlugIn zoomToCoordinatePlugIn = new ZoomToCoordinatePlugIn(); - private ZoomToFullExtentPlugIn zoomToFullExtentPlugIn = new ZoomToFullExtentPlugIn(); -// private ZoomToLayerPlugIn zoomToLayerPlugIn = new ZoomToLayerPlugIn(); - private ZoomToSelectedItemsPlugIn zoomToSelectedItemsPlugIn = new ZoomToSelectedItemsPlugIn(); -// private CutSelectedItemsPlugIn cutSelectedItemsPlugIn = new CutSelectedItemsPlugIn(); -// -// private CutSelectedLayersPlugIn cutSelectedLayersPlugIn = new CutSelectedLayersPlugIn(); -// -// private CopyStylesPlugIn copyStylesPlugIn = new CopyStylesPlugIn(); -// -// private PasteStylesPlugIn pasteStylesPlugIn = new PasteStylesPlugIn(); -// -// private CombineSelectedFeaturesPlugIn combineSelectedFeaturesPlugIn = new CombineSelectedFeaturesPlugIn(); -// -// private MergeSelectedFeaturesPlugIn mergeSelectedFeaturesPlugIn = new MergeSelectedFeaturesPlugIn(); -// -// private ExplodeSelectedFeaturesPlugIn explodeSelectedFeaturesPlugIn = new ExplodeSelectedFeaturesPlugIn(); - // superseded by org/openjump/OpenJumpConfiguration.java - // private InstallReferencedImageFactoriesPlugin - // installReferencedImageFactoriesPlugin = new - // InstallReferencedImageFactoriesPlugin(); - -// private ImageLayerManagerPlugIn imageLayerManagerPlugIn = new ImageLayerManagerPlugIn(); -// -// private AddImageLayerPlugIn addImageLayerPlugIn = new AddImageLayerPlugIn(); -// -// private RefreshDataStoreLayerPlugin refreshDataStoreLayerPlugin = new RefreshDataStoreLayerPlugin(); -// -// private DuplicateItemPlugIn duplicateItemPlugIn = new DuplicateItemPlugIn(); - - // / Initialize ArrangeViewsPlugIn G. Aruta 2012-13-12 -// private ArrangeViewsPlugIn arrangeHorizontalPlugIn = new ArrangeViewsPlugIn(1); -// -// private ArrangeViewsPlugIn arrangeVerticalPlugIn = new ArrangeViewsPlugIn(2); -// -// private ArrangeViewsPlugIn arrangeCascadePlugIn = new ArrangeViewsPlugIn(3); -// -// private ArrangeViewsPlugIn arrangeAllPlugIn = new ArrangeViewsPlugIn(4); - // //////////////////////////////////////////////////////////////////// public void setup(WorkbenchContext workbenchContext) throws Exception { @@ -387,7 +151,6 @@ configureCategoryPopupMenu(workbenchContext, featureInstaller); configureLayerViewPanelPopupMenu(workbenchContext, checkFactory, featureInstaller); - // org.openjump.core.feature.OperationFactory.init(workbenchContext.createPlugInContext()); initializeRenderingManager(); @@ -417,59 +180,6 @@ .getCategoryPopupMenu(); PlugInContext pc = workbenchContext.createPlugInContext(); -// SetCategoryVisibilityPlugIn.getInstance(pc).initialize(pc); - -// featureInstaller.addPopupMenuPlugin(menu, addNewLayerPlugIn, -// addNewLayerPlugIn.getName(), false, IconLoader.icon("layers.png"), null); -// -// featureInstaller.addPopupMenuPlugin(menu, addNewCategoryPlugIn); - -// menu.addSeparator(); // =================== - - // [sstein 20.01.2006] added again after user request -// featureInstaller.addPopupMenuPlugin(menu, loadDatasetPlugIn, -// loadDatasetPlugIn.getName() + "...", false, -// LoadDatasetPlugIn.getIcon(), -// LoadDatasetPlugIn.createEnableCheck(workbenchContext)); - // -- - // featureInstaller.addPopupMenuItem(workbenchContext.getWorkbench() - // .getFrame().getCategoryPopupMenu(), loadDatasetFromFilePlugIn, - // loadDatasetFromFilePlugIn.getName() + "...", false, null, - // LoadDatasetPlugIn.createEnableCheck(workbenchContext)); - - // [sstein 21.Mar.2008] removed since now contained in new open menu - // [sstein 2.June.2008] added back due to table list history (need to check - // other way?) -// featureInstaller.addPopupMenuPlugin(menu, addDatastoreLayerPlugIn, -// addDatastoreLayerPlugIn.getName() + "...", false, -// addDatastoreLayerPlugIn.ICON, null); - /* - * //[sstein 21.Mar.2008] removed since now contained in new open menu - * featureInstaller.addPopupMenuItem(workbenchContext.getWorkbench() - * .getFrame().getCategoryPopupMenu(), addWMSQueryPlugIn, - * addWMSQueryPlugIn.getName() + "...", false, null, null); - * - * featureInstaller.addPopupMenuItem(workbenchContext.getWorkbench() - * .getFrame().getCategoryPopupMenu(), addImageLayerPlugIn, - * addImageLayerPlugIn.getName() + "...", false, null, null); - */ - -// featureInstaller.addPopupMenuPlugin(menu, pasteLayersPlugIn, -// pasteLayersPlugIn.getNameWithMnemonic(), false, null, -// pasteLayersPlugIn.createEnableCheck(workbenchContext)); - -// menu.addSeparator(); // =================== - -// featureInstaller.addPopupMenuPlugin(menu, removeSelectedCategoriesPlugIn, -// removeSelectedCategoriesPlugIn.getName(), false, null, -// removeSelectedCategoriesPlugIn.createEnableCheck(workbenchContext)); - -// menu.addSeparator(); // =================== -// -// featureInstaller.addPopupMenuPlugin(menu, new MoveCategoryToTop()); -// featureInstaller.addPopupMenuPlugin(menu, new MoveCategoryOneUp()); -// featureInstaller.addPopupMenuPlugin(menu, new MoveCategoryOneDown()); -// featureInstaller.addPopupMenuPlugin(menu, new MoveCategoryToBottom()); } private void configureWMSQueryNamePopupMenu( @@ -477,263 +187,20 @@ FeatureInstaller featureInstaller, EnableCheckFactory checkFactory) { JPopupMenu wmsLayerNamePopupMenu = workbenchContext.getWorkbench() .getFrame().getWMSLayerNamePopupMenu(); - -// featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, -// editWMSQueryPlugIn, editWMSQueryPlugIn.getName() + "...", false, null, -// editWMSQueryPlugIn.createEnableCheck(workbenchContext)); -// wmsLayerNamePopupMenu.addSeparator(); // =================== -//// featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, moveUpPlugIn, -//// moveUpPlugIn.getName(), false, MoveLayerablePlugIn.UPICON, -//// moveUpPlugIn.createEnableCheck(workbenchContext)); -//// featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, moveDownPlugIn, -//// moveDownPlugIn.getName(), false, MoveLayerablePlugIn.DOWNICON, -//// moveDownPlugIn.createEnableCheck(workbenchContext)); -// wmsLayerNamePopupMenu.addSeparator(); // =================== -// featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, -// cutSelectedLayersPlugIn, cutSelectedLayersPlugIn.getNameWithMnemonic(), -// false, cutSelectedLayersPlugIn.ICON, -// cutSelectedLayersPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(wmsLayerNamePopupMenu, -// copySelectedLayersPlugIn, -// copySelectedLayersPlugIn.getNameWithMnemonic(), false, -// copySelectedLayersPlugIn.ICON, -// copySelectedLayersPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuPlugin(wmsLayerNamePopupMenu, -// disposeSelectedLayersPlugIn); } private void configureAttributePopupMenu( final WorkbenchContext workbenchContext, FeatureInstaller featureInstaller, EnableCheckFactory checkFactory) { -// AttributeTab.addPopupMenuItem(workbenchContext, editablePlugIn, -// editablePlugIn.getName(), true, EditablePlugIn.ICON, -// editablePlugIn.createEnableCheck(workbenchContext)); -// AttributeTab.addPopupMenuItem(workbenchContext, viewSchemaPlugIn, -// viewSchemaPlugIn.getName(), false, ViewSchemaPlugIn.ICON, -// ViewSchemaPlugIn.createEnableCheck(workbenchContext)); -// AttributeTab.addPopupMenuItem(workbenchContext, featureInfoPlugIn, -// featureInfoPlugIn.getName(), false, FeatureInfoPlugIn.ICON, -// FeatureInfoPlugIn.createEnableCheck(workbenchContext)); -// AttributeTab.addPopupMenuItem(workbenchContext, cutSelectedItemsPlugIn, -// cutSelectedItemsPlugIn.getName(), false, CutSelectedItemsPlugIn.ICON, -// cutSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// AttributeTab.addPopupMenuItem(workbenchContext, copySelectedItemsPlugIn, -// copySelectedItemsPlugIn.getNameWithMnemonic(), false, -// copySelectedItemsPlugIn.ICON, -// CopySelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// AttributeTab.addPopupMenuItem(workbenchContext, deleteSelectedItemsPlugIn, -// deleteSelectedItemsPlugIn.getName(), false, -// DeleteSelectedItemsPlugIn.ICON, -// DeleteSelectedItemsPlugIn.createEnableCheck(workbenchContext)); } private void configureLayerPopupMenu(final WorkbenchContext workbenchContext, FeatureInstaller featureInstaller, EnableCheckFactory checkFactory) { - - JPopupMenu layerNamePopupMenu = workbenchContext.getWorkbench().getFrame() - .getLayerNamePopupMenu(); - -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, editablePlugIn, -// editablePlugIn.getName(), true, EditablePlugIn.ICON, -// editablePlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, selectablePlugIn, -// selectablePlugIn.getName(), true, selectablePlugIn.ICON, -// selectablePlugIn.createEnableCheck(workbenchContext)); - -// layerNamePopupMenu.addSeparator(); // =================== -// -// featureInstaller.addPopupMenuPlugin(layerNamePopupMenu, -// disposeSelectedLayersPlugIn); - -// layerNamePopupMenu.addSeparator(); // =================== -// -// featureInstaller.addPopupMenuPlugin(layerNamePopupMenu, new LayerPropertiesPlugIn()); - -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, zoomToLayerPlugIn, -// zoomToLayerPlugIn.getName(), false, ZoomToLayerPlugIn.ICON, -// zoomToLayerPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, viewAttributesPlugIn, -// viewAttributesPlugIn.getName(), false, -// GUIUtil.toSmallIcon(viewAttributesPlugIn.getIcon()), -// viewAttributesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, viewSchemaPlugIn, -// new String[] { MenuNames.SCHEMA }, viewSchemaPlugIn.getName() + "...", -// false, ViewSchemaPlugIn.ICON, -// ViewSchemaPlugIn.createEnableCheck(workbenchContext)); -//// FeatureInstaller.childMenuItem(MenuNames.SCHEMA, layerNamePopupMenu) -//// .setIcon(ViewSchemaPlugIn.ICON); - -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, changeStylesPlugIn, -// new String[] { MenuNames.STYLE }, changeStylesPlugIn.getName() + "...", -// false, GUIUtil.toSmallIcon(changeStylesPlugIn.getIcon()), -// changeStylesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, copyStylesPlugIn, -// new String[] { MenuNames.STYLE }, copyStylesPlugIn.getName(), false, -// GUIUtil.toSmallIcon(copyStylesPlugIn.getIcon()), -// CopyStylesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuPlugin(layerNamePopupMenu, pasteStylesPlugIn, -// new String[] { MenuNames.STYLE }); -//// FeatureInstaller.childMenuItem(MenuNames.STYLE, layerNamePopupMenu) -//// .setIcon(IconLoader.icon("color_wheel.png")); - -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, -// refreshDataStoreLayerPlugin, new String[] { MenuNames.DATASTORE }, -// refreshDataStoreLayerPlugin.getName(), false, -// RefreshDataStoreLayerPlugin.ICON, -// RefreshDataStoreLayerPlugin.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, -// imageLayerManagerPlugIn, imageLayerManagerPlugIn.getName() + "...", -// false, imageLayerManagerPlugIn.getIcon(), -// ImageLayerManagerPlugIn.createEnableCheck(workbenchContext)); -//// FeatureInstaller.childMenuItem(MenuNames.DATASTORE, layerNamePopupMenu) -//// .setIcon(IconLoader.icon("database_gear.png")); - -// layerNamePopupMenu.addSeparator(); // =================== - - // [sstein 18.Oct.2011] re-added the saveDatasetAsFilePlugIn and the MacOSX - // check - // since under MacOSX the SaveDatasetAsPlugIn is missing a text field to - // write the name of the new file. Hence, the dialog could only be used - // for saving to an existing dataset. - // [sstein 7.Nov.2011] not needed anymore as the bug 3428076 could be fixed - /* - * if(CheckOS.isMacOsx()){ - * featureInstaller.addPopupMenuItem(layerNamePopupMenu, - * saveDatasetAsFilePlugIn, saveDatasetAsFilePlugIn.getName() + "...", - * false, SaveDatasetAsPlugIn.ICON, AbstractSaveDatasetAsPlugIn - * .createEnableCheck(workbenchContext)); } - */ -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, saveDatasetAsPlugIn, -// saveDatasetAsPlugIn.getName() + "...", false, SaveDatasetAsPlugIn.ICON, -// AbstractSaveDatasetAsPlugIn.createEnableCheck(workbenchContext)); - -// layerNamePopupMenu.addSeparator(); // =================== -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, moveUpPlugIn, -// moveUpPlugIn.getName(), false, MoveLayerablePlugIn.UPICON, -// moveUpPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, moveDownPlugIn, -// moveDownPlugIn.getName(), false, MoveLayerablePlugIn.DOWNICON, -// moveDownPlugIn.createEnableCheck(workbenchContext)); - -// layerNamePopupMenu.addSeparator(); // =================== -// -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, -// cutSelectedLayersPlugIn, cutSelectedLayersPlugIn.getNameWithMnemonic(), -// false, cutSelectedLayersPlugIn.ICON, -// cutSelectedLayersPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, -// copySelectedLayersPlugIn, -// copySelectedLayersPlugIn.getNameWithMnemonic(), false, -// copySelectedLayersPlugIn.ICON, -// copySelectedLayersPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuPlugin(layerNamePopupMenu, new CombineSelectedLayersPlugIn()); -// -// layerNamePopupMenu.addSeparator(); // =================== - -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, addNewFeaturesPlugIn, -// addNewFeaturesPlugIn.getName() + "...", false, -// AddNewFeaturesPlugIn.ICON, -// AddNewFeaturesPlugIn.createEnableCheck(workbenchContext)); -// -// // <<TODO:REFACTORING>> JUMPConfiguration is polluted with a lot of -// // EnableCheck -// // logic. This logic should simply be moved to the individual PlugIns. -// // [Jon Aquino] -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, pasteItemsPlugIn, -// pasteItemsPlugIn.getNameWithMnemonic(), false, -// pasteItemsPlugIn.getIcon(), -// PasteItemsPlugIn.createEnableCheck(workbenchContext)); -// -// // [sstein 22 Jan 2012] Not necessary as we have "Delete Selected Items" in -// // "Edit" menu -// // but for now put it in separators, to avoid accidental use -// layerNamePopupMenu.addSeparator(); // =================== -// -// featureInstaller.addPopupMenuItem(layerNamePopupMenu, -// deleteAllFeaturesPlugIn, deleteAllFeaturesPlugIn.getName(), false, -// DeleteAllFeaturesPlugIn.ICON, -// deleteAllFeaturesPlugIn.createEnableCheck(workbenchContext)); -// -// layerNamePopupMenu.addSeparator(); // =================== - } private void configureLayerViewPanelPopupMenu( WorkbenchContext workbenchContext, EnableCheckFactory checkFactory, FeatureInstaller featureInstaller) { - JPopupMenu popupMenu = LayerViewPanel.popupMenu(); - -// featureInstaller.addPopupMenuItem(popupMenu, featureInfoPlugIn, -// featureInfoPlugIn.getName(), false, FeatureInfoPlugIn.ICON, -// FeatureInfoPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem( -// popupMenu, -// verticesInFencePlugIn, -// verticesInFencePlugIn.getName(), -// false, -// null, -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(checkFactory.createFenceMustBeDrawnCheck())); -// popupMenu.addSeparator(); // =================== -// featureInstaller.addPopupMenuItem( -// popupMenu, -// zoomToFencePlugIn, -// new String[] { I18N.get("ui.MenuNames.ZOOM") }, -// I18N.get("JUMPConfiguration.fence"), -// false, -// GUIUtil.toSmallIcon(zoomToFencePlugIn.getIcon()), -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(checkFactory.createFenceMustBeDrawnCheck())); -// featureInstaller.addPopupMenuItem(popupMenu, zoomToSelectedItemsPlugIn, -// new String[] { I18N.get("ui.MenuNames.ZOOM") }, -// zoomToSelectedItemsPlugIn.getName(), false, -// GUIUtil.toSmallIcon(zoomToSelectedItemsPlugIn.getIcon()), -// ZoomToSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// // featureInstaller.addPopupMenuItem(popupMenu, zoomToClickPlugIn, -// // I18N.get("JUMPConfiguration.zoom-out"), false, null, null); -// popupMenu.addSeparator(); // =================== - -// featureInstaller.addPopupMenuItem(popupMenu, cutSelectedItemsPlugIn, -// cutSelectedItemsPlugIn.getName(), false, CutSelectedItemsPlugIn.ICON, -// cutSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuPlugin(popupMenu, copySelectedItemsPlugIn, -// copySelectedItemsPlugIn.getNameWithMnemonic(), false, -// copySelectedItemsPlugIn.getIcon(), -// CopySelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuPlugin(popupMenu, pasteItemsAtPlugIn); -// featureInstaller.addPopupMenuItem(popupMenu, editSelectedFeaturePlugIn, -// editSelectedFeaturePlugIn.getName(), false, -// editSelectedFeaturePlugIn.getIcon(), -// EditSelectedFeaturePlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(popupMenu, deleteSelectedItemsPlugIn, -// deleteSelectedItemsPlugIn.getName(), false, -// deleteSelectedItemsPlugIn.getIcon(), -// DeleteSelectedItemsPlugIn.createEnableCheck(workbenchContext)); - -// featureInstaller.addPopupMenuItem(popupMenu, duplicateItemPlugIn, -// duplicateItemPlugIn.getName(), false, duplicateItemPlugIn.getIcon(), -// DuplicateItemPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addPopupMenuItem(popupMenu, combineSelectedFeaturesPlugIn, -// combineSelectedFeaturesPlugIn.getName(), false, -// combineSelectedFeaturesPlugIn.getIcon(), -// combineSelectedFeaturesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(popupMenu, mergeSelectedFeaturesPlugIn, -// mergeSelectedFeaturesPlugIn.getName(), false, -// mergeSelectedFeaturesPlugIn.getIcon(), -// mergeSelectedFeaturesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addPopupMenuItem(popupMenu, explodeSelectedFeaturesPlugIn, -// explodeSelectedFeaturesPlugIn.getName(), false, -// explodeSelectedFeaturesPlugIn.getIcon(), -// explodeSelectedFeaturesPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addPopupMenuItem(popupMenu, copyThisCoordinatePlugIn, -// copyThisCoordinatePlugIn.getName(), false, null, -// CopyThisCoordinatePlugIn.createEnableCheck(workbenchContext)); - } private void configureMainMenus(final WorkbenchContext workbenchContext, @@ -751,308 +218,16 @@ workbenchContext.getWorkbench().getFrame().new ExitPlugin() .initialize(workbenchContext.createPlugInContext()); -// FeatureInstaller.addMainMenu(featureInstaller, -// fileMenuPath, MenuNames.FILE_NEW, 0); -// featureInstaller.addMainMenuPlugin(new NewTaskPlugIn() { -// public String getName() { -// return I18N.get("ui.WorkbenchFrame.task"); -// } -// }, new String[] { MenuNames.FILE, MenuNames.FILE_NEW }); -// featureInstaller.addMenuSeparator(new String[] { MenuNames.FILE, -// MenuNames.FILE_NEW }); // ============================================= -// featureInstaller -// .addMainMenuItem( -// addNewLayerPlugIn, -// new String[] { MenuNames.FILE, MenuNames.FILE_NEW }, -// new JMenuItem( -// I18N.get("com.vividsolutions.jump.workbench.ui.plugin.AddNewLayerPlugIn.name"), -// IconLoader.icon("layers.png")), checkFactory -// .createWindowWithLayerViewPanelMustBeActiveCheck()); -// featureInstaller.addMainMenuPlugin(new AddNewCategoryPlugIn() { -// public String getName() { -// return I18N -// .get("com.vividsolutions.jump.workbench.ui.plugin.AddNewCategoryPlugIn.name"); -// } -// }, new String[] { MenuNames.FILE, MenuNames.FILE_NEW }); - -// featureInstaller.addMenuSeparator(MenuNames.FILE); // ===================== - -// featureInstaller.addMainMenuItem(saveDatasetAsPlugIn, -// fileMenuPath, saveDatasetAsPlugIn.getName() + "...", -// false, SaveDatasetAsPlugIn.ICON, -// SaveDatasetAsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(saveProjectPlugIn, -// fileMenuPath, saveProjectPlugIn.getName(), false, -// SaveProjectPlugIn.ICON, -// checkFactory.createTaskWindowMustBeActiveCheck()); -// featureInstaller.addMainMenuItem(saveProjectAsPlugIn, -// fileMenuPath, saveProjectAsPlugIn.getName() + "...", -// false, SaveProjectAsPlugIn.ICON, -// checkFactory.createTaskWindowMustBeActiveCheck()); -// FeatureInstaller.addMainMenu(featureInstaller, -// fileMenuPath, MenuNames.FILE_SAVEVIEW, 5); -// featureInstaller.addMainMenuItem(saveImageAsPlugIn, new String[] { -// MenuNames.FILE, MenuNames.FILE_SAVEVIEW }, saveImageAsPlugIn.getName() -// + "...", false, null, -// SaveImageAsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(copyImagePlugIn, -// new String[] { MenuNames.FILE }, copyImagePlugIn.getName(), false, -// copyImagePlugIn.ICON, -// CopyImagePlugIn.createEnableCheck(workbenchContext)); - /** - * EDIT =================================================================== - */ -// featureInstaller.addMainMenuItem(undoPlugIn, -// new String[] { MenuNames.EDIT }, undoPlugIn.getName(), false, -// GUIUtil.toSmallIcon(undoPlugIn.getIcon()), -// undoPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(redoPlugIn, -// new String[] { MenuNames.EDIT }, redoPlugIn.getName(), false, -// GUIUtil.toSmallIcon(redoPlugIn.getIcon()), -// redoPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addMenuSeparator(MenuNames.EDIT); // =================== - -// featureInstaller.addMainMenuItem(cutSelectedItemsPlugIn, -// new String[] { MenuNames.EDIT }, cutSelectedItemsPlugIn.getName(), -// false, CutSelectedItemsPlugIn.ICON, -// cutSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuPlugin(copySelectedItemsPlugIn, -// new String[] { MenuNames.EDIT }); -// featureInstaller.addMainMenuPlugin(pasteItemsPlugIn, -// new String[] { MenuNames.EDIT }); -// -// featureInstaller.addMenuSeparator(MenuNames.EDIT); // =================== - -// featureInstaller.addMainMenuItem(deleteSelectedItemsPlugIn, -// new String[] { MenuNames.EDIT }, deleteSelectedItemsPlugIn.getName(), -// false, DeleteSelectedItemsPlugIn.ICON, -// DeleteSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addMenuSeparator(MenuNames.EDIT); // =================== - -// FeatureInstaller.addMainMenu(featureInstaller, -// new String[] { MenuNames.EDIT }, MenuNames.SELECTION, -1); - -// featureInstaller.addMainMenuPlugin(new InvertSelectionPlugIn(), new String[] { MenuNames.EDIT }); - -// featureInstaller.addMainMenuItem(clearSelectionPlugIn, -// new String[] { MenuNames.EDIT }, clearSelectionPlugIn.getName(), false, -// null, clearSelectionPlugIn.createEnableCheck(workbenchContext)); - -// featureInstaller.addMenuSeparator(MenuNames.EDIT); // =================== - -// featureInstaller.addMainMenuItem(addNewFeaturesPlugIn, -// new String[] { MenuNames.EDIT }, -// addNewFeaturesPlugIn.getName() + "...", false, -// AddNewFeaturesPlugIn.ICON, -// AddNewFeaturesPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(editSelectedFeaturePlugIn, -// new String[] { MenuNames.EDIT }, editSelectedFeaturePlugIn.getName(), -// false, editSelectedFeaturePlugIn.getIcon(), -// EditSelectedFeaturePlugIn.createEnableCheck(workbenchContext)); - - - /** - * VIEW ================================================================= - */ - -// featureInstaller.addMainMenuItem(zoomPreviousPlugIn, -// new String[] { MenuNames.VIEW }, zoomPreviousPlugIn.getName(), false, -// GUIUtil.toSmallIcon(zoomPreviousPlugIn.getIcon()), -// zoomPreviousPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(zoomNextPlugIn, -// new String[] { MenuNames.VIEW }, zoomNextPlugIn.getName(), false, -// GUIUtil.toSmallIcon(zoomNextPlugIn.getIcon()), -// zoomNextPlugIn.createEnableCheck(workbenchContext)); -// -// featureInstaller.addMenuSeparator(MenuNames.VIEW); // =================== - -// editingPlugIn.createMainMenuItem(new String[] { MenuNames.VIEW }, -// GUIUtil.toSmallIcon(EditingPlugIn.ICON), workbenchContext); -// -// -// featureInstaller.addMainMenuItem(toolTipsPlugIn, -// new String[] { MenuNames.VIEW }, toolTipsPlugIn.getName(), true, -// IconLoader.icon("show_tooltip.png"), -// MapToolTipsPlugIn.createEnableCheck(workbenchContext)); -// zoomBarPlugIn.createMainMenuItem(new String[] { MenuNames.VIEW }, null, -// workbenchContext); - -// featureInstaller.addMainMenuItem( -// showScalePlugIn, -// new String[] { MenuNames.VIEW, MenuNames.MAP_DECORATIONS }, -// showScalePlugIn.getName(), -// true, -// IconLoader.icon("show_scale_text.png"), -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(new EnableCheck() { -// public String check(JComponent component) { -// ((JCheckBoxMenuItem) component).setSelected(ShowScaleRenderer -// .isEnabled(workbenchContext.getLayerViewPanel())); -// return null; -// } -// })); -// featureInstaller.addMainMenuItem( -// scaleBarPlugIn, -// new String[] { MenuNames.VIEW, MenuNames.MAP_DECORATIONS }, -// scaleBarPlugIn.getName(), -// true, -// IconLoader.icon("show_scale.png"), -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(new EnableCheck() { -// public String check(JComponent component) { -// ((JCheckBoxMenuItem) component).setSelected(ScaleBarRenderer -// .isEnabled(workbenchContext.getLayerViewPanel())); -// return null; -// } -// })); -// -// featureInstaller.addMenuSeparator(MenuNames.VIEW); // =================== - -// featureInstaller.addMainMenuItem(zoomToFullExtentPlugIn, -// new String[] { MenuNames.VIEW }, zoomToFullExtentPlugIn.getName(), -// false, zoomToFullExtentPlugIn.getIcon16(), -// zoomToFullExtentPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem( -// zoomToFencePlugIn, -// new String[] { MenuNames.VIEW }, -// zoomToFencePlugIn.getName(), -// false, -// GUIUtil.toSmallIcon(zoomToFencePlugIn.getIcon()), -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(checkFactory.createFenceMustBeDrawnCheck())); -// featureInstaller.addMainMenuItem(zoomToSelectedItemsPlugIn, -// new String[] { MenuNames.VIEW }, zoomToSelectedItemsPlugIn.getName(), -// false, GUIUtil.toSmallIcon(zoomToSelectedItemsPlugIn.getIcon()), -// ZoomToSelectedItemsPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(zoomToCoordinatePlugIn, -// new String[] { MenuNames.VIEW }, zoomToCoordinatePlugIn.getName() -// + "...", false, null, -// zoomToCoordinatePlugIn.createEnableCheck(workbenchContext)); - -// featureInstaller.addMenuSeparator(MenuNames.VIEW); // =================== - -// featureInstaller.addMainMenuItem(featureInfoPlugIn, -// new String[] { MenuNames.VIEW }, featureInfoPlugIn.getName(), false, -// FeatureInfoPlugIn.ICON, -// FeatureInfoPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem( -// verticesInFencePlugIn, -// new String[] { MenuNames.VIEW }, -// verticesInFencePlugIn.getName(), -// false, -// null, -// new MultiEnableCheck().add( -// checkFactory.createWindowWithLayerViewPanelMustBeActiveCheck()) -// .add(checkFactory.createFenceMustBeDrawnCheck())); -// featureInstaller.addMainMenuPlugin(new CopyBBoxPlugin(), new String[] { MenuNames.VIEW }); -// -// featureInstaller.addMenuSeparator(MenuNames.VIEW); // =================== - - /** * LAYER ================================================================== */ configLayer(workbenchContext, checkFactory, featureInstaller); - - /** - * WINDOW ================================================================= - */ -// featureInstaller.addMainMenuItem(outputWindowPlugIn, -// new String[] { MenuNames.WINDOW }, outputWindowPlugIn.getName(), false, -// GUIUtil.toSmallIcon(outputWindowPlugIn.getIcon()), null); -// featureInstaller.addMainMenuItem(generateLogPlugIn, -// new String[] { MenuNames.WINDOW }, generateLogPlugIn.getName(), false, -// GUIUtil.toSmallIcon(generateLogPlugIn.getIcon()), null); -// featureInstaller.addMenuSeparator(MenuNames.WINDOW); // =================== -// -// featureInstaller.addMainMenuPlugin(arrangeHorizontalPlugIn, -// new String[] { MenuNames.WINDOW }); -// featureInstaller.addMainMenuPlugin(arrangeVerticalPlugIn, -// new String[] { MenuNames.WINDOW }); -// featureInstaller.addMainMenuPlugin(arrangeCascadePlugIn, -// new String[] { MenuNames.WINDOW }); -// featureInstaller.addMainMenuPlugin(arrangeAllPlugIn, -// new String[] { MenuNames.WINDOW }); - - -// new MosaicInternalFramesPlugIn().initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); - -// featureInstaller.addMenuSeparator(MenuNames.WINDOW); // =================== - -// featureInstaller.addMainMenuPlugin(cloneWindowPlugIn, -// new String[] { MenuNames.WINDOW }); - -// new SynchronizationPlugIn("").initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); - -// featureInstaller.addMenuSeparator(MenuNames.WINDOW); // =================== - - /** - * HELP =================================================================== - */ -// featureInstaller.addMainMenuItem(shortcutKeysPlugIn, -// new String[] { MenuNames.HELP }, shortcutKeysPlugIn.getName() + "...", -// false, ShortcutKeysPlugIn.ICON, null); -// new FeatureInstaller(workbenchContext).addMainMenuItem(new AboutPlugIn(), -// new String[] { MenuNames.HELP }, I18N.get("JUMPConfiguration.about"), -// false, AboutPlugIn.ICON, null); - - /** - * CUSTOMIZE ============================================================== - */ -// featureInstaller.addMainMenuItem(optionsPlugIn, -// new String[] { MenuNames.CUSTOMIZE }, optionsPlugIn.getName() + "...", -// false, null, null); } -// private AddDatastoreLayerPlugIn addDatastoreLayerPlugIn = new AddDatastoreLayerPlugIn(); -// private InstallDatastoreLayerRendererHintsPlugIn installDatastoreLayerRendererHintsPlugIn = new InstallDatastoreLayerRendererHintsPlugIn(); private void configLayer(final WorkbenchContext workbenchContext, final EnableCheckFactory checkFactory, FeatureInstaller featureInstaller) throws Exception { - - String MENU_LAYER = MenuNames.LAYER; - - // featureInstaller.addMenuSeparator(MENU_LAYER); // =================== -// featureInstaller.addMainMenuItem(cutSelectedLayersPlugIn, -// new String[] { MENU_LAYER }, -// new JMenuItem(cutSelectedLayersPlugIn.getNameWithMnemonic(), -// cutSelectedLayersPlugIn.ICON), cutSelectedLayersPlugIn -// .createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(copySelectedLayersPlugIn, -// new String[] { MENU_LAYER }, -// new JMenuItem(copySelectedLayersPlugIn.getNameWithMnemonic(), -// copySelectedLayersPlugIn.ICON), copySelectedLayersPlugIn -// .createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuItem(pasteLayersPlugIn, -// new String[] { MENU_LAYER }, -// new JMenuItem(pasteLayersPlugIn.getNameWithMnemonic()), -// pasteLayersPlugIn.createEnableCheck(workbenchContext)); -// featureInstaller.addMainMenuPlugin(new CombineSelectedLayersPlugIn(), new String[] { MENU_LAYER }); -// -// featureInstaller.addMenuSeparator(MENU_LAYER); // =================== -// featureInstaller.addMainMenuPlugin(disposeSelectedLayersPlugIn, -// new String[] { MENU_LAYER }); -// featureInstaller.addMenuSeparator(MENU_LAYER); // =================== - -// featureInstaller.addMainMenuItem(removeSelectedCategoriesPlugIn, -// new String[] { MENU_LAYER }, new JMenuItem( -// removeSelectedCategoriesPlugIn.getName()), -// removeSelectedCategoriesPlugIn.createEnableCheck(workbenchContext)); - -// featureInstaller.addMenuSeparator(MENU_LAYER); // =================== -// featureInstaller.addMainMenuPlugin(addImageLayerPlugIn, -// new String[] { MENU_LAYER }); -// featureInstaller.addMainMenuPlugin(imageLayerManagerPlugIn, -// new String[] { MENU_LAYER }); -// featureInstaller.addMenuSeparator(MENU_LAYER); // =================== } private void configureStyles(WorkbenchContext workbenchContext) { @@ -1153,7 +328,6 @@ frame.getToolBar().addSeparator(); configureEditingButton(workbenchContext); frame.getToolBar().addSeparator(); - // add(new MeasureTool(), workbenchContext); AdvancedMeasureTool advancedMeasureTool = new AdvancedMeasureTool( workbenchContext); workbenchContext Deleted: core/trunk/src/com/vividsolutions/jump/workbench/model/SystemLayerFinder.java.bak =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/model/SystemLayerFinder.java.bak 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/com/vividsolutions/jump/workbench/model/SystemLayerFinder.java.bak 2016-01-13 22:31:29 UTC (rev 4786) @@ -1,109 +0,0 @@ -/* - * The Unified Mapping Platform (JUMP) is an extensible, interactive GUI - * for visualizing and manipulating spatial features with geometry and attributes. - * - * Copyright (C) 2003 Vivid Solutions - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * For more information, contact: - * - * Vivid Solutions - * Suite #1A - * 2328 Government Street - * Victoria BC V8T 5G5 - * Canada - * - * (250)385-6040 - * www.vividsolutions.com - */ - -package com.vividsolutions.jump.workbench.model; - -import java.awt.Color; - -import com.vividsolutions.jump.feature.AttributeType; -import com.vividsolutions.jump.feature.FeatureDataset; -import com.vividsolutions.jump.feature.FeatureSchema; - -/** - * A "system-maintained layer" has a fixed set of styles and is identified by - * name. For example, the vector layer has blue features with arrowheads and - * is named "Warping Vectors". A SystemLayerFinder class will find a particular - * system-maintained layer, and can create it if necessary. - */ -public abstract class SystemLayerFinder { - private String layerName; - private LayerManagerProxy layerManagerProxy; - - public SystemLayerFinder(String layerName, LayerManagerProxy layerManagerProxy) { - this.layerManagerProxy = layerManagerProxy; - this.layerName = layerName; - } - - public String getLayerName() { - return layerName; - } - - public Layer createLayer() { - FeatureSchema schema = new FeatureSchema(); - schema.addAttribute("GEOMETRY", AttributeType.GEOMETRY); - - FeatureDataset dataset = new FeatureDataset(schema); - Layer layer = - new Layer( - layerName, - Color.blue, - dataset, - layerManagerProxy.getLayerManager()) { - public boolean isFeatureCollectionModified() { - //Prevent save prompt. [Jon Aquino] - return false; - } - }; - boolean firingEvents = layerManagerProxy.getLayerManager().isFiringEvents(); - //Can't fire events because this Layerable hasn't been added to the - //LayerManager yet. [Jon Aquino] - layerManagerProxy.getLayerManager().setFiringEvents(false); - - try { - applyStyles(layer); - } finally { - layerManagerProxy.getLayerManager().setFiringEvents(firingEvents); - } - - layerManagerProxy.getLayerManager().addLayer(StandardCategoryNames.SYSTEM, layer); - - return layer; - } - - /** - * @return the layer, or null if there is no layer - */ - public Layer getLayer() { - Layer layer = layerManagerProxy.getLayerManager().getLayer(layerName); - - if (layer == null) { - //Don't automatically create the layer. For example, #getLayer may be - //called by an EnableCheck; we wouldn't want the layer to get created - //in this case. [Jon Aquino] - return null; - } - - return layer; - } - - protected abstract void applyStyles(Layer layer); -} Modified: core/trunk/src/org/openjump/OpenJumpConfiguration.java =================================================================== --- core/trunk/src/org/openjump/OpenJumpConfiguration.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/OpenJumpConfiguration.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -19,7 +19,6 @@ import java.util.Arrays; import java.util.List; -//import org.openjump.core.ccordsys.srid.EnsureAllLayersHaveSRIDStylePlugIn; import org.openjump.core.feature.BeanshellAttributeOperationFactory; import org.openjump.core.rasterimage.AddRasterImageLayerWizard; import org.openjump.core.rasterimage.RasterImageLayer; @@ -28,36 +27,11 @@ import org.openjump.core.ui.io.file.DataSourceFileLayerLoader; import org.openjump.core.ui.io.file.FileLayerLoader; import org.openjump.core.ui.plugin.datastore.AddDataStoreLayerWizard; -//import org.openjump.core.ui.plugin.datastore.RefreshDataStoreQueryPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.ConstrainedMoveVertexPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.DrawCircleWithGivenRadiusPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.DrawConstrainedArcPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.DrawConstrainedCirclePlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.DrawConstrainedLineStringPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.DrawConstrainedPolygonPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.RotateSelectedItemPlugIn; -//import org.openjump.core.ui.plugin.edittoolbox.SelectOneItemPlugIn; import org.openjump.core.ui.plugin.datastore.AddWritableDataStoreLayerWizard; import org.openjump.core.ui.plugin.file.DataSourceQueryChooserOpenWizard; -//import org.openjump.core.ui.plugin.file.FileDragDropPlugin; -//import org.openjump.core.ui.plugin.file.OpenFilePlugIn; -//import org.openjump.core.ui.plugin.file.OpenProjectPlugIn; -//import org.openjump.core.ui.plugin.file.OpenRecentPlugIn; import org.openjump.core.ui.plugin.file.OpenWizardPlugIn; -//import org.openjump.core.ui.plugin.layer.ChangeSRIDPlugIn; -//import org.openjump.core.ui.plugin.layer.LayerPropertiesPlugIn; -//import org.openjump.core.ui.plugin.layer.ToggleVisibilityPlugIn; import org.openjump.core.ui.plugin.layer.pirolraster.RasterImageContextMenu; -//import org.openjump.core.ui.plugin.mousemenu.SaveDatasetsPlugIn; -//import org.openjump.core.ui.plugin.style.ImportArcMapStylePlugIn; -//import org.openjump.core.ui.plugin.style.ImportSLDPlugIn; -//import org.openjump.core.ui.plugin.view.EasyButtonsPlugin; -//import org.openjump.core.ui.plugin.view.MapToolTipPlugIn; -//import org.openjump.core.ui.plugin.view.ShowFullPathPlugIn; -//import org.openjump.core.ui.plugin.view.ShowScalePlugIn; -//import org.openjump.core.ui.plugin.view.ZoomToScalePlugIn; import org.openjump.core.ui.plugin.wms.AddWmsLayerWizard; -//import org.openjump.core.ui.plugin.wms.ZoomToWMSLayerPlugIn; import org.openjump.core.ui.style.decoration.ArrowLineStringMiddlepointStyle; import org.openjump.core.ui.style.decoration.SegmentDownhillArrowStyle; import org.openjump.core.ui.style.decoration.VertexZValueStyle; @@ -85,12 +59,8 @@ import com.vividsolutions.jump.workbench.ui.EditTransaction; import com.vividsolutions.jump.workbench.ui.WorkbenchFrame; import com.vividsolutions.jump.workbench.ui.plugin.PersistentBlackboardPlugIn; -//import com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugIn; import com.vividsolutions.jump.workbench.ui.renderer.RenderingManager; -//import de.latlon.deejump.plugin.SaveLegendPlugIn; -//import de.latlon.deejump.plugin.style.LayerStyle2SLDPlugIn; - /** * This class loads all OpenJUMP plugins. The method * loadOpenJumpPlugIns() is called from @@ -119,427 +89,9 @@ /*************************************************************************** * OperationFactories **************************************************************************/ - BeanshellAttributeOperationFactory baof = new BeanshellAttributeOperationFactory(pluginContext); + BeanshellAttributeOperationFactory baof = new BeanshellAttributeOperationFactory(pluginContext); /*************************************************************************** - * menu FILE - **************************************************************************/ - //--[sstein 10.July.2008] I leave these plugins in this class, as they seem to me - // essential to be removable, similar for the others that are still initialized here - -// OpenProjectPlugIn openProject = new OpenProjectPlugIn(); -// openProject.initialize(pluginContext); -// -// OpenFilePlugIn openFile = new OpenFilePlugIn(); -// openFile.initialize(pluginContext); - -// OpenWizardPlugIn open = new OpenWizardPlugIn(); -// open.initialize(pluginContext); - -// RunDatastoreQueryPlugIn runDatastoreQueryPlugIn = new RunDatastoreQueryPlugIn(); -// runDatastoreQueryPlugIn.initialize(pluginContext); - -// OpenRecentPlugIn openRecent = OpenRecentPlugIn.get(workbenchContext); -// openRecent.initialize(pluginContext); - -// FileDragDropPlugin fileDragDropPlugin = new FileDragDropPlugin(); -// fileDragDropPlugin.initialize(pluginContext); - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - SaveImageAsSVGPlugIn imageSvgPlugin = new SaveImageAsSVGPlugIn(); - imageSvgPlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - - /*************************************************************************** - * menu EDIT - **************************************************************************/ - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - SelectItemsByFenceFromSelectedLayersPlugIn selectItemsFromLayersPlugIn = new SelectItemsByFenceFromSelectedLayersPlugIn(); - selectItemsFromLayersPlugIn.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - - SelectItemsByCircleFromSelectedLayersPlugIn selectItemsFromCirclePlugIn = new SelectItemsByCircleFromSelectedLayersPlugIn(); - selectItemsFromCirclePlugIn.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - - SelectAllLayerItemsPlugIn selectAllLayerItemsPlugIn = new SelectAllLayerItemsPlugIn(); - selectAllLayerItemsPlugIn.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - - ReplicateSelectedItemsPlugIn replicatePlugIn = new ReplicateSelectedItemsPlugIn(); - replicatePlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - SelectByTypePlugIn mySelectByGeomTypePlugIn = new SelectByTypePlugIn(); - mySelectByGeomTypePlugIn.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - - ExtractLayersByGeometry myExtractLayersByGeometryPlugin = new ExtractLayersByGeometry(); - myExtractLayersByGeometryPlugin.initialize(new PlugInContext(workbenchContext, null, null, null, null)); - - ExtractLayerInFence myExtractLayerInFence = new ExtractLayerInFence(); - myExtractLayerInFence.initialize(new PlugInContext(workbenchContext, null, null, null, null)); - */ - - /*************************************************************************** - * menu VIEW - **************************************************************************/ - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - new CopyBBoxPlugin().initialize(new PlugInContext(workbenchContext, null, null, null, null)); - */ -// EasyButtonsPlugin myEasyButtonsPlugIn = new EasyButtonsPlugin(); -// myEasyButtonsPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); - - //ZoomToWMSPlugIn myZoomToWMSPlugIn = new ZoomToWMSPlugIn(); - //myZoomToWMSPlugIn.initialize(new PlugInContext(workbenchContext, null, - // null, null, null)); - -// ZoomToWMSLayerPlugIn myZoomToWMSLayerPlugIn = new ZoomToWMSLayerPlugIn(); -// myZoomToWMSLayerPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// ZoomToScalePlugIn myZoomToScalePlugIn = new ZoomToScalePlugIn(); -// myZoomToScalePlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// ShowScalePlugIn myShowScalePlugIn = new ShowScalePlugIn(); -// myShowScalePlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// MapToolTipPlugIn myMapTipPlugIn = new MapToolTipPlugIn(); -// myMapTipPlugIn.initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); - - /*************************************************************************** - * menu LAYER - **************************************************************************/ - - // -- deeJUMP function by LAT/LON [01.08.2006 sstein] - //LayerStyle2SLDPlugIn mySytle2SLDplugIn = new LayerStyle2SLDPlugIn(); - //mySytle2SLDplugIn.initialize(new PlugInContext(workbenchContext, null, - // null, null, null)); - - //new ImportSLDPlugIn().initialize(pluginContext); - //new ImportArcMapStylePlugIn().initialize(pluginContext); - - //pluginContext.getFeatureInstaller().addMenuSeparator(LAYER); - - // --this caused problems with the postgis plugin [sstein] - // TODO: the problem has been solved (using try/catch) but still class has - // to be - // changed using LayerListener LayerEventType.ADDED event instead of - // layerSelectionChanged() from LayerNamePanelListener -// ShowFullPathPlugIn myFullPathPlugin = new ShowFullPathPlugIn(); -// myFullPathPlugin.initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); -// -// ToggleVisibilityPlugIn myToggleVisPlugIn = new ToggleVisibilityPlugIn(); -// myToggleVisPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); - - //-- [sstein 21March2008] unnecessary with new menu structure - // MRSIDtype is added with new open file dialog (see below) - /* - AddSIDLayerPlugIn myMrSIDPlugIn = new AddSIDLayerPlugIn(); - myMrSIDPlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - -// ChangeSRIDPlugIn myChangeSRIDPlugIn = new ChangeSRIDPlugIn(); -// myChangeSRIDPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); - - /*************************************************************************** - * menu TOOLS - **************************************************************************/ - - /** ** ANALYSIS *** */ - /* - JoinAttributesSpatiallyPlugIn mySpatialJoin = new JoinAttributesSpatiallyPlugIn(); - mySpatialJoin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - // -- SIGLE PlugIn - PlanarGraphPlugIn coveragePlugIn = new PlanarGraphPlugIn(); - coveragePlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - IntersectPolygonLayersPlugIn intersectLayers = new IntersectPolygonLayersPlugIn(); - intersectLayers.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - - UnionByAttributePlugIn unionByAttribute = new UnionByAttributePlugIn(); - unionByAttribute.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - */ - /** ** GENERATE *** */ - /* - ConvexHullPlugIn myConvHullPlugIn = new ConvexHullPlugIn(); - myConvHullPlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - CreateThiessenPolygonsPlugIn myThiessenPlugin = new CreateThiessenPolygonsPlugIn(); - myThiessenPlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - /** ** QUERY *** */ - /* - SimpleQueryPlugIn mySimpleQueryPlugIn = new SimpleQueryPlugIn(); - mySimpleQueryPlugIn.initialize(new PlugInContext(workbenchContext, null, - null, null, null)); - */ - /** ** QA *** */ - /* - DeleteEmptyGeometriesPlugIn myDelGeomPlugin = new DeleteEmptyGeometriesPlugIn(); - myDelGeomPlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - /** ** EDIT_GEOMETRY *** */ - /* - JoinWithArcPlugIn myJoinWithArcPlugIn = new JoinWithArcPlugIn(); - myJoinWithArcPlugIn.initialize(new PlugInContext(workbenchContext, null, - null, null, null)); - - BlendLineStringsPlugIn myLSBlender = new BlendLineStringsPlugIn(); - myLSBlender.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - MergeTwoSelectedPolygonsPlugIn twopolymerger = new MergeTwoSelectedPolygonsPlugIn(); - twopolymerger.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - SplitPolygonPlugIn cutpoly = new SplitPolygonPlugIn(); - cutpoly.initialize(new PlugInContext(workbenchContext, null, null, null, - null)); - */ - /** ** EDIT_ATTIBUTES **** */ - /* - ReplaceValuePlugIn myRepVal = new ReplaceValuePlugIn(); - myRepVal.initialize(new PlugInContext(workbenchContext, null, null, null, - null)); - - EditAttributeByFormulaPlugIn formulaEdit = new EditAttributeByFormulaPlugIn(); - formulaEdit.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - /* sstein 31.March08 - * function replaced by JUMP function of similar name that works better - SpatialJoinPlugIn spatialJoinPlugIn = new SpatialJoinPlugIn(); - spatialJoinPlugIn.initialize(new PlugInContext(workbenchContext, null, - null, null, null)); - */ - - /** ** GENERALIZATION *** */ - /* - ReducePointsISAPlugIn mySimplifyISA = new ReducePointsISAPlugIn(); - mySimplifyISA.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - LineSimplifyJTS15AlgorithmPlugIn jtsSimplifier = new LineSimplifyJTS15AlgorithmPlugIn(); - jtsSimplifier.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - /** ** OTHER TOOLS *** */ - /* - MeasureM_FPlugIn myFeetPlugIn = new MeasureM_FPlugIn(); - myFeetPlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - - /*************************************************************************** - * menu CUSTOMIZE [added by Michael Michaud on 2007-03-04] - **************************************************************************/ - // -- deeJUMP function by LAT/LON [05.08.2006 sstein] - /* - ExtensionManagerPlugIn extensionManagerPlugIn = new ExtensionManagerPlugIn(); - extensionManagerPlugIn.install(new PlugInContext(workbenchContext, null, - null, null, null)); - - BeanShellPlugIn beanShellPlugIn = new BeanShellPlugIn(); - beanShellPlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - // -- Larry's BeanToolsPlugIn - BeanToolsPlugIn beanTools = new BeanToolsPlugIn(); - beanTools.initialize(new PlugInContext(workbenchContext, null, null, null, - null)); - */ - /*************************************************************************** - * menu WINDOW - **************************************************************************/ - - /*************************************************************************** - * menu HELP - **************************************************************************/ - - /*************************************************************************** - * Right click menus - **************************************************************************/ -// JPopupMenu popupMenu = LayerViewPanel.popupMenu(); -// popupMenu.addSeparator(); - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - MoveAlongAnglePlugIn myMoveAlongAnglePlugin = new MoveAlongAnglePlugIn(); - myMoveAlongAnglePlugin.initialize(new PlugInContext(workbenchContext, null, - null, null, null)); - - RotatePlugIn myRotatePlugin = new RotatePlugIn(); - myRotatePlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - SelectLayersWithSelectedItemsPlugIn selectLayersWithSelectedItemsPlugIn = new SelectLayersWithSelectedItemsPlugIn(); - selectLayersWithSelectedItemsPlugIn.initialize(new PlugInContext( - workbenchContext, null, null, null, null)); - */ -// //-- [sstein 10.July.2008] leave them, as they seem to be essential -// SaveDatasetsPlugIn mySaveDataSetPlugIn = new SaveDatasetsPlugIn(); -// mySaveDataSetPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// LayerPropertiesPlugIn myLayerPropertiesPlugIn = new LayerPropertiesPlugIn(); -// myLayerPropertiesPlugIn.initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// -// //ChangeLayerableNamePlugIn changeLayerableNamePlugIn = new ChangeLayerableNamePlugIn(); -// //changeLayerableNamePlugIn.initialize(new PlugInContext(workbenchContext, -// // null, null, null, null)); -// -// RefreshDataStoreQueryPlugIn refreshDataStoreQueryPlugIn = new RefreshDataStoreQueryPlugIn(); -// refreshDataStoreQueryPlugIn.initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); - -// // -- deeJUMP function by LAT/LON [01.08.2006 sstein] -// new LayerStyle2SLDPlugIn().initialize(pluginContext); -// new ImportSLDPlugIn().initialize(pluginContext); -// new ImportArcMapStylePlugIn().initialize(pluginContext); - - //featureInstaller.addPopupMenuItem(layerNamePopupMenu, refreshDataStoreQueryPlugin, - // new String[]{MenuNames.DATASTORE}, refreshDataStoreQueryPlugin.getName() + "...", false, RefreshDataStoreQueryPlugin.ICON, - // RefreshDataStoreQueryPlugin.createEnableCheck(workbenchContext)); - - //-- [sstein 22.Feb.2009] - //-- adds renderer for (Pirol/Sextante) raster images - //RenderingManager.putRendererForLayerable(RasterImageLayer.class, new RasterImageLayerRendererFactory(pluginContext.getWorkbenchContext())); - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - EditSelectedSidePlugIn myEditSidePlugin = new EditSelectedSidePlugIn(); - myEditSidePlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ -// // -- deeJUMP plugin -// SaveLegendPlugIn saveLegend = new SaveLegendPlugIn(); -// saveLegend.initialize(new PlugInContext(workbenchContext, null, null, null, -// null)); - - // -- SIGLE plugin - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - /* - JoinTablePlugIn joinTablePlugIn = new JoinTablePlugIn(); - joinTablePlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - PasteItemsAtPlugIn pasteItemsAtPlugIn = new PasteItemsAtPlugIn(); - pasteItemsAtPlugIn.initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - */ - /**+++++++++++++++++++++++ - * Category Context menu - *++++++++++++++++++++++++**/ - -// // -- Pirol plugins -// SetCategoryVisibilityPlugIn.getInstance(workbenchContext.createPlugInContext()).initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// new MoveCategoryToTop().initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// new MoveCategoryOneUp().initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// new MoveCategoryOneDown().initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// new MoveCategoryToBottom().initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); - - /*************************************************************************** - * EDITing toolbox - **************************************************************************/ - - //-- [sstein 10.July.2008] leave them, as they seem to be essential - // note: it is intended to replace the original JUMP edition tools with the constrained tools -// DrawConstrainedPolygonPlugIn myConstrainedPolygonPlugIn = new DrawConstrainedPolygonPlugIn(); -// myConstrainedPolygonPlugIn.initialize(new PlugInContext(workbenchContext, -// null, null, null, null)); -// -// DrawConstrainedLineStringPlugIn myConstrainedLSPlugIn = new DrawConstrainedLineStringPlugIn(); -// myConstrainedLSPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// DrawConstrainedCirclePlugIn myConstrainedCPlugIn = new DrawConstrainedCirclePlugIn(); -// myConstrainedCPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// DrawConstrainedArcPlugIn myConstrainedArcPlugIn = new DrawConstrainedArcPlugIn(); -// myConstrainedArcPlugIn.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// ConstrainedMoveVertexPlugIn myCMVPlugIn = new ConstrainedMoveVertexPlugIn(); -// myCMVPlugIn.initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); -// -// RotateSelectedItemPlugIn myRotateSIPlugIn = new RotateSelectedItemPlugIn(); -// myRotateSIPlugIn.initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); -// -// SelectOneItemPlugIn mySelectOnePlugin = new SelectOneItemPlugIn(); -// mySelectOnePlugin.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); -// -// DrawCircleWithGivenRadiusPlugIn drawCirclePlugin = new DrawCircleWithGivenRadiusPlugIn(); -// drawCirclePlugin.initialize(new PlugInContext(workbenchContext, null, null, -// null, null)); - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - // as these are advanced editing tools [i.e. more for experts?] - /* - CutPolygonSIGLEPlugIn cutPolyPlugin = new CutPolygonSIGLEPlugIn(); - cutPolyPlugin.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - - AutoCompletePolygonPlugIn myAutoCompletePlugIn = new AutoCompletePolygonPlugIn(); - myAutoCompletePlugIn.initialize(new PlugInContext(workbenchContext, null, null, - null, null)); - */ - // -- now initialized in #EditingPlugIn.java to fill toolbox - /* - * ScaleSelectedItemsPlugIn myScaleItemsPlugin = new - * ScaleSelectedItemsPlugIn(); myScaleItemsPlugin.initialize(new - * PlugInContext(workbenchContext, null, null, null, null)); - */ - - /*************************************************************************** - * others - **************************************************************************/ - - //-- [sstein 10.July.2008] now initialized with default-plugins.xml file - // takes care of keyboard navigation - /* - new InstallKeyPanPlugIn().initialize(new PlugInContext(workbenchContext, - null, null, null, null)); - */ -// // -- enables to store the SRID = EPSG code as style for every Layer -// // since it is stored as style it should be saved in the project file -// EnsureAllLayersHaveSRIDStylePlugIn ensureLayerSRIDPlugin = new EnsureAllLayersHaveSRIDStylePlugIn(); -// ensureLayerSRIDPlugin.initialize(new PlugInContext(workbenchContext, null, -// null, null, null)); - - /*************************************************************************** * Decoration **************************************************************************/ @@ -643,7 +195,8 @@ addImageFactory(workbenchContext, registry, new MrSIDImageFactory(), null); // register revamped geoimage - // Nicolas Ribot: 04 dec: protection against java.lang.NoClassDefFoundError: it/geosolutions/imageio/gdalframework/GDALImageReaderSpi on Mac OSX + // Nicolas Ribot: 04 dec: protection against java.lang.NoClassDefFoundError: + // it/geosolutions/imageio/gdalframework/GDALImageReaderSpi on Mac OSX // though jar is in classpath and class exists in the Jar. // (missing native Mac OSX gdal files ?) try { Modified: core/trunk/src/org/openjump/core/ui/SelectionStyllingOptionsPanel.java =================================================================== --- core/trunk/src/org/openjump/core/ui/SelectionStyllingOptionsPanel.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/core/ui/SelectionStyllingOptionsPanel.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -22,13 +22,11 @@ import java.util.Hashtable; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.ListCellRenderer; -import javax.swing.SwingUtilities; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; Modified: core/trunk/src/org/openjump/core/ui/plugin/datastore/DataStoreDataSourceFactory.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/datastore/DataStoreDataSourceFactory.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/core/ui/plugin/datastore/DataStoreDataSourceFactory.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -1,8 +1,6 @@ package org.openjump.core.ui.plugin.datastore; import com.vividsolutions.jump.I18N; -import com.vividsolutions.jump.util.CollectionUtil; -import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.datastore.ConnectionDescriptor; import org.openjump.core.ui.plugin.datastore.postgis2.PostGISDataStoreDataSource; @@ -29,21 +27,6 @@ } else { throw new Exception(I18N.getMessage(KEY + ".no-writable-datastore-datasource", driverName)); } - /* - source.setProperties(CollectionUtil.createMap(new Object[]{ - WritableDataStoreDataSource.DATASET_NAME_KEY, datasetName, - WritableDataStoreDataSource.GEOMETRY_ATTRIBUTE_NAME_KEY, geometryAttributeName, - WritableDataStoreDataSource.EXTERNAL_PK_KEY, externalPKName, - WritableDataStoreDataSource.WHERE_CLAUSE_KEY, whereClause, - WritableDataStoreDataSource.MAX_FEATURES_KEY, maxFeatures, - WritableDataStoreDataSource.CONNECTION_DESCRIPTOR_KEY, connectionDescriptor, - WritableDataStoreDataSource.LIMITED_TO_VIEW, limitedToView, // boolean - WritableDataStoreDataSource.MANAGE_CONFLICTS, manageConflicts // boolean - })); - source.getProperties().put(WritableDataStoreDataSource.CREATE_PK, false); - source.getProperties().put(WritableDataStoreDataSource.CREATE_TABLE, false); - source.setWorkbenchContext(context); - */ return source; } Modified: core/trunk/src/org/openjump/core/ui/plugin/datastore/RefreshDataStoreQueryPlugIn.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/datastore/RefreshDataStoreQueryPlugIn.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/core/ui/plugin/datastore/RefreshDataStoreQueryPlugIn.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -1,7 +1,6 @@ package org.openjump.core.ui.plugin.datastore; import com.vividsolutions.jump.coordsys.CoordinateSystemRegistry; -import com.vividsolutions.jump.feature.Feature; import com.vividsolutions.jump.feature.FeatureSchema; import com.vividsolutions.jump.io.datasource.DataSourceQuery; import com.vividsolutions.jump.I18N; @@ -18,7 +17,6 @@ import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; import com.vividsolutions.jump.workbench.ui.plugin.OpenProjectPlugIn; import com.vividsolutions.jump.workbench.WorkbenchContext; -import java.util.Iterator; import javax.swing.ImageIcon; import javax.swing.JPopupMenu; Modified: core/trunk/src/org/openjump/sigle/plugin/joinTable/JoinTableDataSourceCSV.java =================================================================== --- core/trunk/src/org/openjump/sigle/plugin/joinTable/JoinTableDataSourceCSV.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/sigle/plugin/joinTable/JoinTableDataSourceCSV.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -10,14 +10,9 @@ import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileReader; -import java.io.IOException; import java.io.InputStreamReader; -import java.io.StreamTokenizer; -import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Hashtable; -import java.util.Iterator; -import java.util.StringTokenizer; import java.util.regex.Pattern; import com.vividsolutions.jts.io.ParseException; Modified: core/trunk/src/org/openjump/swing/list/LabelListCellRenderer.java =================================================================== --- core/trunk/src/org/openjump/swing/list/LabelListCellRenderer.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/swing/list/LabelListCellRenderer.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -4,7 +4,6 @@ import java.awt.Component; import javax.swing.DefaultListCellRenderer; -import javax.swing.Icon; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.UIManager; Modified: core/trunk/src/org/openjump/util/XPathUtils.java =================================================================== --- core/trunk/src/org/openjump/util/XPathUtils.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/util/XPathUtils.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -41,7 +41,6 @@ import static javax.xml.xpath.XPathConstants.NODE; import static javax.xml.xpath.XPathConstants.NODESET; import static javax.xml.xpath.XPathConstants.NUMBER; -import static org.apache.log4j.Logger.getLogger; import java.util.LinkedList; Modified: core/trunk/src/org/openjump/util/metaData/MetaInformationHandler.java =================================================================== --- core/trunk/src/org/openjump/util/metaData/MetaInformationHandler.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/util/metaData/MetaInformationHandler.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -17,7 +17,6 @@ import org.openjump.core.apitools.objecttyperoles.FeatureCollectionRoleTypes; import org.openjump.core.apitools.objecttyperoles.PirolFeatureCollection; import org.openjump.core.apitools.objecttyperoles.RoleStandardFeatureCollection; -import org.openjump.util.metaData.ObjectContainingMetaInformation; import com.vividsolutions.jump.feature.FeatureCollection; import com.vividsolutions.jump.workbench.model.Layer; Modified: core/trunk/src/org/openjump/util/python/ModifyGeometry.java =================================================================== --- core/trunk/src/org/openjump/util/python/ModifyGeometry.java 2016-01-13 17:32:15 UTC (rev 4785) +++ core/trunk/src/org/openjump/util/python/ModifyGeometry.java 2016-01-13 22:31:29 UTC (rev 4786) @@ -35,14 +35,12 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; -import java.util.List; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jump.feature.Feature; import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.model.LayerManager; import com.vividsolutions.jump.workbench.model.Layer; -import com.vividsolutions.jump.workbench.plugin.PlugInContext; import com.vividsolutions.jump.workbench.ui.EditTransaction; import com.vividsolutions.jump.workbench.ui.GeometryEditor; import com.vividsolutions.jump.workbench.model.UndoableEditReceiver; ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel