-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7dfa61
commit 4fd8de0
Showing
13 changed files
with
112 additions
and
109 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/FSClientInputFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintAnnotationHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintEngineImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintGlyphAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
200 changes: 100 additions & 100 deletions
200
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintOptionsPanelController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,100 @@ | ||
/* | ||
* sonarlint4netbeans: SonarLint integration for Apache Netbeans | ||
* Copyright (C) 2019 Philippe FICHET. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library 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 | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package fr.philippefichet.sonarlint.netbeans; | ||
|
||
import java.beans.PropertyChangeListener; | ||
import java.beans.PropertyChangeSupport; | ||
import javax.swing.JComponent; | ||
import javax.swing.SwingUtilities; | ||
import org.netbeans.spi.options.OptionsPanelController; | ||
import org.openide.util.HelpCtx; | ||
import org.openide.util.Lookup; | ||
|
||
@OptionsPanelController.SubRegistration( | ||
displayName = "#AdvancedOption_DisplayName_SonarLint", | ||
keywords = "#AdvancedOption_Keywords_SonarLint", | ||
keywordsCategory = "SonarLint" | ||
) | ||
@org.openide.util.NbBundle.Messages({"AdvancedOption_DisplayName_SonarLint=SonarLint", "AdvancedOption_Keywords_SonarLint=sonarlint"}) | ||
public final class SonarLintOptionsPanelController extends OptionsPanelController { | ||
|
||
private SonarLintPanel panel; | ||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); | ||
private boolean changed; | ||
|
||
public void update() { | ||
getPanel().load(); | ||
changed = false; | ||
} | ||
|
||
public void applyChanges() { | ||
SwingUtilities.invokeLater(new Runnable() { | ||
@Override | ||
public void run() { | ||
getPanel().store(); | ||
changed = false; | ||
} | ||
}); | ||
} | ||
|
||
public void cancel() { | ||
// need not do anything special, if no changes have been persisted yet | ||
} | ||
|
||
public boolean isValid() { | ||
return getPanel().valid(); | ||
} | ||
|
||
public boolean isChanged() { | ||
return changed; | ||
} | ||
|
||
public HelpCtx getHelpCtx() { | ||
return null; // new HelpCtx("...ID") if you have a help set | ||
} | ||
|
||
public JComponent getComponent(Lookup masterLookup) { | ||
return getPanel(); | ||
} | ||
|
||
public void addPropertyChangeListener(PropertyChangeListener l) { | ||
pcs.addPropertyChangeListener(l); | ||
} | ||
|
||
public void removePropertyChangeListener(PropertyChangeListener l) { | ||
pcs.removePropertyChangeListener(l); | ||
} | ||
|
||
private SonarLintPanel getPanel() { | ||
if (panel == null) { | ||
panel = new SonarLintPanel(this); | ||
} | ||
return panel; | ||
} | ||
|
||
void changed() { | ||
if (!changed) { | ||
changed = true; | ||
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true); | ||
} | ||
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null); | ||
} | ||
|
||
} | ||
/* | ||
* sonarlint4netbeans: SonarLint integration for Apache Netbeans | ||
* Copyright (C) 2020 Philippe FICHET. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library 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 | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package fr.philippefichet.sonarlint.netbeans; | ||
|
||
import java.beans.PropertyChangeListener; | ||
import java.beans.PropertyChangeSupport; | ||
import javax.swing.JComponent; | ||
import javax.swing.SwingUtilities; | ||
import org.netbeans.spi.options.OptionsPanelController; | ||
import org.openide.util.HelpCtx; | ||
import org.openide.util.Lookup; | ||
|
||
@OptionsPanelController.SubRegistration( | ||
displayName = "#AdvancedOption_DisplayName_SonarLint", | ||
keywords = "#AdvancedOption_Keywords_SonarLint", | ||
keywordsCategory = "SonarLint" | ||
) | ||
@org.openide.util.NbBundle.Messages({"AdvancedOption_DisplayName_SonarLint=SonarLint", "AdvancedOption_Keywords_SonarLint=sonarlint"}) | ||
public final class SonarLintOptionsPanelController extends OptionsPanelController { | ||
|
||
private SonarLintPanel panel; | ||
private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); | ||
private boolean changed; | ||
|
||
public void update() { | ||
getPanel().load(); | ||
changed = false; | ||
} | ||
|
||
public void applyChanges() { | ||
SwingUtilities.invokeLater(new Runnable() { | ||
@Override | ||
public void run() { | ||
getPanel().store(); | ||
changed = false; | ||
} | ||
}); | ||
} | ||
|
||
public void cancel() { | ||
// need not do anything special, if no changes have been persisted yet | ||
} | ||
|
||
public boolean isValid() { | ||
return getPanel().valid(); | ||
} | ||
|
||
public boolean isChanged() { | ||
return changed; | ||
} | ||
|
||
public HelpCtx getHelpCtx() { | ||
return null; // new HelpCtx("...ID") if you have a help set | ||
} | ||
|
||
public JComponent getComponent(Lookup masterLookup) { | ||
return getPanel(); | ||
} | ||
|
||
public void addPropertyChangeListener(PropertyChangeListener l) { | ||
pcs.addPropertyChangeListener(l); | ||
} | ||
|
||
public void removePropertyChangeListener(PropertyChangeListener l) { | ||
pcs.removePropertyChangeListener(l); | ||
} | ||
|
||
private SonarLintPanel getPanel() { | ||
if (panel == null) { | ||
panel = new SonarLintPanel(this); | ||
} | ||
return panel; | ||
} | ||
|
||
void changed() { | ||
if (!changed) { | ||
changed = true; | ||
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true); | ||
} | ||
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintParserResultTask.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintParserResultTaskFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintTaskScanner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarLintUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/fr/philippefichet/sonarlint/netbeans/SonarRuleDetailsTopComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters