BGBM BDI Projects
/
taxeditor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c312c1e
)
avoid NPE in check for dirty editors
author
Katja Luther
<k.luther@bgbm.org>
Mon, 10 Jul 2017 06:59:41 +0000
(08:59 +0200)
committer
Katja Luther
<k.luther@bgbm.org>
Mon, 10 Jul 2017 10:38:33 +0000
(12:38 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbstractImportWizard.java
patch
|
blob
|
history
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
patch
|
blob
|
history
diff --git
a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbstractImportWizard.java
b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbstractImportWizard.java
index 313ce1e793c404dab1c93fcec02d31d0b32b17b3..b77dbb8f4c32cf2578a3d0206968e7ffc079a718 100644
(file)
--- a/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbstractImportWizard.java
+++ b/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbstractImportWizard.java
@@
-78,8
+78,10
@@
public abstract class AbstractImportWizard<CONFIG extends IIoConfigurator> exten
if(activePage != null){
for (IEditorReference reference : activePage.getEditorReferences()) {
IEditorPart editor = reference.getEditor(false);
if(activePage != null){
for (IEditorReference reference : activePage.getEditorReferences()) {
IEditorPart editor = reference.getEditor(false);
- if(editor.isDirty()){
- return true;
+ if (editor!= null){
+ if(editor.isDirty()){
+ return true;
+ }
}
}
}
}
}
}
@@
-88,7
+90,7
@@
public abstract class AbstractImportWizard<CONFIG extends IIoConfigurator> exten
@Override
public boolean canFinish() {
@Override
public boolean canFinish() {
- return !existUnsavedEditors() && super.canFinish();
+
return !existUnsavedEditors() && super.canFinish();
}
public abstract CONFIG getConfigurator();
}
public abstract CONFIG getConfigurator();
diff --git
a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
index 6651d3ecd32af560109448fcdef96467a77535bf..f08e478159c0549921a2857de30833d5fdce1945 100644
(file)
--- a/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
+++ b/
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/GenericConfiguratorWizardPage.java
@@
-185,13
+185,13
@@
public class GenericConfiguratorWizardPage extends WizardPage {
final String methodName = method.getName();
final Button checkBox = new Button(parent, SWT.CHECK);
final String methodName = method.getName();
final Button checkBox = new Button(parent, SWT.CHECK);
- if(configurator.getClass().equals(Abcd206ImportConfigurator.class)){
+
//
if(configurator.getClass().equals(Abcd206ImportConfigurator.class)){
String[] r = methodName.split("set")[1].split("(?=\\p{Upper})");
checkBox.setText(getLabel(StringUtils.join(r," ")));
String[] r = methodName.split("set")[1].split("(?=\\p{Upper})");
checkBox.setText(getLabel(StringUtils.join(r," ")));
- }
- else{
- checkBox.setText(getLabel(methodName));
- }
+
//
}
+
//
else{
+
//
checkBox.setText(getLabel(methodName));
+
//
}
// retrieve the default values and set the checkbox accordingly
boolean defaultSelection = executeBooleanGetMethod(configurator, "is"
+ methodName.substring(3));
// retrieve the default values and set the checkbox accordingly
boolean defaultSelection = executeBooleanGetMethod(configurator, "is"
+ methodName.substring(3));