mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
correct version number
This commit is contained in:
@@ -103,6 +103,6 @@ public class DomFileIndex extends ScalarIndexExtension<String>{
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return DomApplicationComponent.getInstance().getCumulativeVersion();
|
||||
return DomApplicationComponent.getInstance().getCumulativeVersion(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,17 @@ public class DomApplicationComponent {
|
||||
return ServiceManager.getService(DomApplicationComponent.class);
|
||||
}
|
||||
|
||||
public int getCumulativeVersion() {
|
||||
public int getCumulativeVersion(boolean forStubs) {
|
||||
int result = 0;
|
||||
for (DomFileDescription description : getAllFileDescriptions()) {
|
||||
if (description.hasStubs()) {
|
||||
result += description.getStubVersion();
|
||||
if (forStubs) {
|
||||
if (description.hasStubs()) {
|
||||
result += description.getStubVersion();
|
||||
result += description.getRootTagName().hashCode(); // so that a plugin enabling/disabling could trigger the reindexing
|
||||
}
|
||||
}
|
||||
else {
|
||||
result += description.getVersion();
|
||||
result += description.getRootTagName().hashCode(); // so that a plugin enabling/disabling could trigger the reindexing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,6 @@ public class DomStubBuilder implements BinaryFileStubBuilder {
|
||||
|
||||
@Override
|
||||
public int getStubVersion() {
|
||||
return 21 + DomApplicationComponent.getInstance().getCumulativeVersion();
|
||||
return 21 + DomApplicationComponent.getInstance().getCumulativeVersion(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user