Skip to content

Commit a1171e5

Browse files
committed
Completed
Task #21 - The Statusbar element should only be there when we are in a python context Bump version Update description
1 parent 947913a commit a1171e5

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
<verifyIntegrity>true</verifyIntegrity>
175175
<verifyRuntime>warn</verifyRuntime>
176176
<requiresRestart>true</requiresRestart>
177-
<author>${dev.name}</author>
177+
<author>albilu</author>
178178
<homePageUrl>https://github.com/albilu/netbeansPython</homePageUrl>
179179
<licenseFile>LICENSE</licenseFile>
180180
<licenseName>GNU General Public License v3.0</licenseName>
@@ -812,9 +812,8 @@
812812
</dependency>-->
813813
</dependencies>
814814
<properties>
815-
<dev.name>albilu</dev.name>
816815
<netbeans.release.version>RELEASE170</netbeans.release.version>
817-
<next.version>1.0</next.version>
816+
<next.version>1.1</next.version>
818817
<git.url>https://github.com/albilu/netbeansPython</git.url>
819818
<git.link>https://github.com/albilu/netbeansPython.git</git.link>
820819
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/org/netbeans/modules/python/statusbar/PythonStatusBarPanel.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import org.netbeans.api.options.OptionsDisplayer;
88
import org.netbeans.api.project.FileOwnerQuery;
99
import org.netbeans.api.project.Project;
10-
import org.netbeans.modules.python.project.PythonProject;
1110
import org.netbeans.modules.python.PythonUtility;
1211
import org.netbeans.modules.python.packagemanager.PythonPackagesModel;
12+
import org.netbeans.modules.python.project.PythonProject;
1313
import org.openide.loaders.DataObject;
1414
import org.openide.util.Exceptions;
1515
import org.openide.util.Lookup;
@@ -101,6 +101,13 @@ public void resultChanged(LookupEvent ev) {
101101
try {
102102
DataObject dataO = (DataObject) c.iterator().next();
103103
Project owner = FileOwnerQuery.getOwner(dataO.getPrimaryFile());
104+
if ((!dataO.getPrimaryFile().isFolder() && !dataO.getPrimaryFile().getMIMEType()
105+
.equals(PythonUtility.PYTHON_MIME_TYPE))
106+
|| owner == null || !(owner instanceof PythonProject)) {
107+
setVisible(false);
108+
return;
109+
}
110+
setVisible(true);
104111
if (owner != null && owner instanceof PythonProject) {
105112
String projectPythonExe = PythonUtility.getProjectPythonExe(owner
106113
.getProjectDirectory());

src/main/nbm/manifest.mf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ OpenIDE-Module-Display-Category: Editor
66
OpenIDE-Module-Requires: org.openide.windows.WindowManager
77
OpenIDE-Module-Long-Description: <html>This plugin enables Python Programming Language support for Apache Netbeans.
88
It leverage the Spyder IDE community supported Language Server Protocol. See more details at the
9-
<b><a href="https://github.com/albilu/netbeansPython">Full User Guide</a><b></html>
9+
<a href="https://github.com/albilu/netbeansPython">Full User Guide</a>
10+
<br><br>Please Report any bugs at <a href="https://github.com/albilu/netbeansPython/issues">Issues</a>
11+
</html>

0 commit comments

Comments
 (0)