File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
tmc-plugin/src/fi/helsinki/cs/tmc/coreimpl Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,22 @@ public Path getConfigRoot() {
124124
125125 @ Override
126126 public String hostProgramName () {
127+ final String productString = System .getProperty ("netbeans.productversion" ).trim ();
128+ final String computedName = productString .substring (0 , productString .lastIndexOf (" " )).trim ();
129+ if (!computedName .isEmpty ()) {
130+ return computedName ;
131+ }
127132 return "netbeans" ;
128133 }
129134
130135 @ Override
131136 public String hostProgramVersion () {
132- return System .getProperty ("netbeans.buildnumber" );
137+ final String productString = System .getProperty ("netbeans.productversion" ).trim ();
138+ final String computedVersion = productString .substring (productString .lastIndexOf (" " ), productString .length ()).trim ();
139+ if (!computedVersion .isEmpty ()) {
140+ return computedVersion ;
141+ }
142+ return "unknown" ;
133143 }
134144
135145 public static class SavedEvent implements TmcEvent {}
You can’t perform that action at this time.
0 commit comments