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() {
124
124
125
125
@ Override
126
126
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
+ }
127
132
return "netbeans" ;
128
133
}
129
134
130
135
@ Override
131
136
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" ;
133
143
}
134
144
135
145
public static class SavedEvent implements TmcEvent {}
You can’t perform that action at this time.
0 commit comments