Changeset 32503 in osm for applications/editors
- Timestamp:
- 2016-07-01T20:25:06+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/rasterfilters
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/rasterfilters/.settings/org.eclipse.jdt.core.prefs
r31485 r32503 1 1 eclipse.preferences.version=1 2 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled 3 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore 4 org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull 5 org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= 6 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault 7 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= 8 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable 9 org.eclipse.jdt.core.compiler.annotation.nullable.secondary= 10 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled 2 11 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 12 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 13 org.eclipse.jdt.core.compiler.compliance=1.7 14 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 5 15 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 16 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore 17 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning 18 org.eclipse.jdt.core.compiler.problem.deadCode=warning 19 org.eclipse.jdt.core.compiler.problem.deprecation=warning 20 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled 21 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled 22 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning 23 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore 6 24 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 25 org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore 26 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 27 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled 28 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore 29 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning 30 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning 31 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error 32 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning 33 org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled 34 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning 35 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning 36 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 37 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 38 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning 39 org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore 40 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore 41 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 42 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 43 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 44 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 45 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore 46 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 47 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning 48 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning 49 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore 50 org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning 51 org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning 52 org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error 53 org.eclipse.jdt.core.compiler.problem.nullReference=warning 54 org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error 55 org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning 56 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning 57 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore 58 org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning 59 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore 60 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore 61 org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore 62 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning 63 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning 64 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore 65 org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning 66 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning 67 org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore 68 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore 69 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled 70 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning 71 org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled 72 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled 73 org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled 74 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore 75 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning 76 org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled 77 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning 78 org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning 79 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 80 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning 81 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore 82 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore 83 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore 84 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore 85 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled 86 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 87 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 88 org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore 89 org.eclipse.jdt.core.compiler.problem.unusedImport=warning 90 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning 91 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning 92 org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore 93 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore 94 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled 95 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled 96 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled 97 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 98 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore 99 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning 100 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 7 101 org.eclipse.jdt.core.compiler.source=1.7 -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java
r32329 r32503 9 9 import org.openstreetmap.josm.Main; 10 10 import org.openstreetmap.josm.gui.MapFrame; 11 import org.openstreetmap.josm.gui.MapView;12 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;13 11 import org.openstreetmap.josm.gui.SideButton; 14 12 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 15 13 import org.openstreetmap.josm.gui.layer.ImageryLayer; 16 import org.openstreetmap.josm.gui.layer.Layer; 14 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 15 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 16 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 17 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 18 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 19 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 17 20 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 18 21 import org.openstreetmap.josm.plugins.Plugin; … … 22 25 import org.openstreetmap.josm.plugins.rasterfilters.preferences.FiltersDownloader; 23 26 import org.openstreetmap.josm.plugins.rasterfilters.preferences.RasterFiltersPreferences; 27 24 28 /** 25 29 * Main Plugin class. This class embed new plugin button for adding filter and … … 29 33 * 30 34 */ 31 public class RasterFiltersPlugin extends Plugin implements LayerChangeListener { 35 public class RasterFiltersPlugin extends Plugin implements LayerChangeListener, ActiveLayerChangeListener { 32 36 33 37 private SideButton filterButton; … … 59 63 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 60 64 if (Main.isDisplayingMapView()) { 61 MapView.addLayerChangeListener(this); 65 Main.getLayerManager().addLayerChangeListener(this); 66 Main.getLayerManager().addActiveLayerChangeListener(this); 62 67 } 63 68 } 64 69 65 70 @Override 66 public void activeLayerChange (Layer oldLayer, Layer newLayer) {67 if (!( newLayerinstanceof ImageryLayer)) {71 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 72 if (!(Main.getLayerManager().getActiveLayer() instanceof ImageryLayer)) { 68 73 filterButton.setEnabled(false); 69 74 } else { 70 75 filterButton.setEnabled(true); 71 76 } 72 73 77 } 74 78 75 79 @Override 76 public void layerAdded(Layer newLayer) {80 public void layerAdded(LayerAddEvent e) { 77 81 78 82 if (filterButton == null) { 79 83 80 // filter reading and adding to the collections of 81 // FilterDownloader 84 // filter reading and adding to the collections of FilterDownloader 82 85 FiltersDownloader.downloadFiltersInfoList(); 83 86 FiltersDownloader.initFilters(); … … 87 90 } 88 91 89 if ( newLayerinstanceof ImageryLayer) {92 if (e.getAddedLayer() instanceof ImageryLayer) { 90 93 filterButton = new SideButton(action, false); 91 94 filterButton.setEnabled(true); … … 97 100 LayerListDialog dialog = LayerListDialog.getInstance(); 98 101 99 JPanel buttonRowPanel = (JPanel) ((JPanel) dialog.getComponent(2)) 100 .getComponent(0); 102 JPanel buttonRowPanel = (JPanel) ((JPanel) dialog.getComponent(2)).getComponent(0); 101 103 buttonRowPanel.add(filterButton); 102 104 } 103 105 104 if ( newLayerinstanceof ImageryLayer) {105 FiltersDialog dialog = new FiltersDialog((ImageryLayer) newLayer);106 if (e.getAddedLayer() instanceof ImageryLayer) { 107 FiltersDialog dialog = new FiltersDialog((ImageryLayer) e.getAddedLayer()); 106 108 action.addFiltersDialog(dialog); 107 109 } … … 110 112 111 113 @Override 112 public void layerRemov ed(Layer oldLayer) {114 public void layerRemoving(LayerRemoveEvent e) { 113 115 114 if ( oldLayerinstanceof ImageryLayer) {115 FiltersDialog dialog = action.getDialogByLayer( oldLayer);116 ((ImageryLayer) oldLayer).removeImageProcessor(dialog.getFiltersManager());116 if (e.getRemovedLayer() instanceof ImageryLayer) { 117 FiltersDialog dialog = action.getDialogByLayer(e.getRemovedLayer()); 118 ((ImageryLayer) e.getRemovedLayer()).removeImageProcessor(dialog.getFiltersManager()); 117 119 dialog.closeFrame(); 118 120 action.removeFiltersDialog(dialog); … … 132 134 133 135 @Override 136 public void layerOrderChanged(LayerOrderChangeEvent e) { 137 // Do nothing 138 } 139 140 @Override 134 141 public PreferenceSetting getPreferenceSetting() { 135 142 if (setting == null) { … … 139 146 return setting; 140 147 } 141 142 148 } -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/actions/ShowLayerFiltersDialog.java
r32329 r32503 29 29 public final class ShowLayerFiltersDialog extends AbstractAction implements LayerAction { 30 30 31 private List<FiltersDialog> dialogs = new ArrayList< FiltersDialog>();31 private List<FiltersDialog> dialogs = new ArrayList<>(); 32 32 33 33 /** -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/gui/FiltersDialog.java
r31504 r32503 39 39 private JPanel pane; 40 40 private JButton addButton; 41 private DefaultComboBoxModel<String> listModel = new DefaultComboBoxModel< String>();41 private DefaultComboBoxModel<String> listModel = new DefaultComboBoxModel<>(); 42 42 private Set<String> showedFiltersTitles = new HashSet<>(); 43 43 private JPanel filterContainer; -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/RasterFiltersPreferences.java
r31504 r32503 111 111 112 112 String[] columnNames = { "Filter Name", "Author", "Description", "" }; 113 Class[] columnClasses = { String.class, String.class, String.class, Boolean.class }; 113 Class<?>[] columnClasses = { String.class, String.class, String.class, Boolean.class }; 114 114 List<FilterInfo> filtersInfoList; 115 115 Object[][] data; … … 161 161 162 162 @Override 163 public Class getColumnClass(int col) { 163 public Class<?> getColumnClass(int col) { 164 164 return columnClasses[col]; 165 165 }
Note:
See TracChangeset
for help on using the changeset viewer.