продолжение рефакторинга. создал предка для класса current
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ProjectData.Project;
|
||||
import Common.CommonConstants;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
@@ -311,7 +312,7 @@ public class db_project_info extends DBObject {
|
||||
}
|
||||
public boolean IsMCopy() {
|
||||
String lname = name.toLowerCase();
|
||||
return (lname.startsWith("m") && CommonUtils.isDigit(lname.substring(1)));
|
||||
return (lname.startsWith("m") && CommonUtils.isIntegerValue(lname.substring(1)));
|
||||
}
|
||||
public String getTitle() {
|
||||
return name + " " + CommonUtils.DQuotes(description);
|
||||
@@ -432,8 +433,8 @@ public class db_project_info extends DBObject {
|
||||
db.ResetAI(MessageWarning.class);
|
||||
db.ResetAI(MessageRecommendation.class);
|
||||
//-
|
||||
Current.set(Current.Function, null);
|
||||
Current.set(Current.SelectedFunction, null);
|
||||
CurrentAnchestor.set(Current.Function, null);
|
||||
CurrentAnchestor.set(Current.SelectedFunction, null);
|
||||
}
|
||||
public void CleanVersions() throws Exception {
|
||||
node.removeAllChildren();
|
||||
@@ -845,7 +846,7 @@ public class db_project_info extends DBObject {
|
||||
for (String key_ : versions.keySet()) {
|
||||
String[] data_ = key_.split(letter);
|
||||
String last = data_[data_.length - 1];
|
||||
if (CommonUtils.isDigit(last)) {
|
||||
if (CommonUtils.isIntegerValue(last)) {
|
||||
int vn = Integer.parseInt(last);
|
||||
if (vn > max_vn)
|
||||
max_vn = vn;
|
||||
@@ -1066,7 +1067,7 @@ public class db_project_info extends DBObject {
|
||||
target.Close();
|
||||
}
|
||||
public void undoLastTransformation() throws Exception {
|
||||
Current.set(Current.Version, null);
|
||||
CurrentAnchestor.set(Current.Version, null);
|
||||
//---
|
||||
UI.getVersionsWindow().getVersionsForm().getTree().RemoveNode(last_version.node);
|
||||
Utils.forceDeleteWithCheck(last_version.Home);
|
||||
|
||||
Reference in New Issue
Block a user