no message

This commit is contained in:
2024-10-11 00:00:30 +03:00
parent a11b7711f7
commit f317ab1aa1
341 changed files with 1866 additions and 1688 deletions

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.Constants;
import _VisualDVM.Current;
import _VisualDVM.Utils;
@@ -85,7 +85,7 @@ public class DBProjectFile extends ProjectFile {
if (data.length > 1) {
String[] data1 = data[1].split(":");
if (data1.length > 0) {
file = CommonUtils.toW(data1[0]);//.substring(1));
file = Utils_.toW(data1[0]);//.substring(1));
//первый символ тут всегда пробел. слеши всегда виндовые.
}
}
@@ -97,7 +97,7 @@ public class DBProjectFile extends ProjectFile {
lastLine = line_in;
father.db.Update(this);
} catch (Exception ex) {
CommonUtils.MainLog.PrintException(ex);
Utils_.MainLog.PrintException(ex);
}
}
}
@@ -156,7 +156,7 @@ public class DBProjectFile extends ProjectFile {
String default_options = "";
switch (languageName) {
case fortran:
default_options += " -spf -noProject -o " + CommonUtils.DQuotes(getDepFile().getAbsolutePath());
default_options += " -spf -noProject -o " + Utils_.DQuotes(getDepFile().getAbsolutePath());
switch (style) {
case free:
default_options += " -f90";
@@ -292,7 +292,7 @@ public class DBProjectFile extends ProjectFile {
father.db.Update(this);
return true;
} catch (Exception e) {
CommonUtils.MainLog.PrintException(e);
Utils_.MainLog.PrintException(e);
}
}
return false;
@@ -304,7 +304,7 @@ public class DBProjectFile extends ProjectFile {
father.db.Update(this);
return true;
} catch (Exception e) {
CommonUtils.MainLog.PrintException(e);
Utils_.MainLog.PrintException(e);
}
}
return false;
@@ -316,7 +316,7 @@ public class DBProjectFile extends ProjectFile {
father.db.Update(this);
return true;
} catch (Exception e) {
CommonUtils.MainLog.PrintException(e);
Utils_.MainLog.PrintException(e);
}
}
return false;
@@ -390,10 +390,10 @@ public class DBProjectFile extends ProjectFile {
father.db.Update(this);
}
public String getUnixName() {
return CommonUtils.toU(name);
return Utils_.toU(name);
}
public String getQObjectName() {
return CommonUtils.DQuotes(getUnixName() + ".o");
return Utils_.DQuotes(getUnixName() + ".o");
}
@Override
@@ -401,7 +401,7 @@ public class DBProjectFile extends ProjectFile {
return name;
}
public String getProjectNameWithoutExtension() {
String extension = CommonUtils.getExtension(file);
String extension = Utils_.getExtension(file);
return name.substring(0, name.length() - (extension.length() + 1));
}
public void importSettings(DBProjectFile parent, boolean sapforStyle) throws Exception {

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.Constants;
import Common.Database.Objects.DBObject;
import _VisualDVM.ProjectData.LanguageName;
@@ -48,7 +48,7 @@ public class ProjectFile extends DBObject {
}
}
//-
switch (CommonUtils.getExtensionFromName(name_in)) {
switch (Utils_.getExtensionFromName(name_in)) {
case "f":
case "fdv":
case "for":
@@ -87,7 +87,7 @@ public class ProjectFile extends DBObject {
fileType = FileType.forbidden;
break;
case "":
if (CommonUtils.isIntegerValue(name_in)) {
if (Utils_.isIntegerValue(name_in)) {
fileType = FileType.forbidden;
} else {
state = FileState.Excluded;
@@ -130,14 +130,14 @@ public class ProjectFile extends DBObject {
return new ImageIcon(imageUrl);
}
public String getUnixName() {
return CommonUtils.toU(file.getName());
return Utils_.toU(file.getName());
}
@Override
public String toString() {
return file.getName();
}
public String getQSourceName() {
return CommonUtils.DQuotes(getUnixName());
return Utils_.DQuotes(getUnixName());
}
public String getStyleOptions() {
if (languageName == LanguageName.fortran) {

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Directives;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.Visual.Editor.CaretInfo;
import _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Providers.BaseProvider;
import _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.SapforAutoComplete;
@@ -18,7 +18,7 @@ public class BaseDirective extends BasicCompletion {
getCaretInfo().suffix_word.isEmpty() &&
name.getText().startsWith(getCaretInfo().prefix_word)
&& (!name.getText().equals(getCaretInfo().prefix_word))
&& !CommonUtils.isRBracketsBalanced(getCaretInfo().before);
&& !Utils_.isRBracketsBalanced(getCaretInfo().before);
}
//итоговая функция, определяющая наличие директивы в автозаполнении
public boolean Check() {

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Directives;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Providers.BaseProvider;
public class IntervalDirective extends BaseDirective {
protected String prefix;
@@ -19,9 +19,9 @@ public class IntervalDirective extends BaseDirective {
}
@Override
public String getReplacementText() {
prefix = CommonUtils.removeRedundantSpaces(getCaretInfo().before.substring(0, getCaretInfo().before.length() - getCaretInfo().prefix_word.length()));
prefix = Utils_.removeRedundantSpaces(getCaretInfo().before.substring(0, getCaretInfo().before.length() - getCaretInfo().prefix_word.length()));
word = name.getText();
suffix = CommonUtils.removeRedundantSpaces(getCaretInfo().after.substring(getCaretInfo().suffix_word.length()));
suffix = Utils_.removeRedundantSpaces(getCaretInfo().after.substring(getCaretInfo().suffix_word.length()));
String pp = prefix.replace(" ", "");
String ps = suffix.replace(" ", "");
if ((!ps.isEmpty()) && (ps.charAt(0) != ','))

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Directives;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.ProjectData.Files.UI.Editor.AutoComplete.SAPFOR.Providers.BaseProvider;
//промежуточный тип. относится ко всем директивам со скобками и требующим запятых.
public class SpecDirective extends BaseDirective {
@@ -16,9 +16,9 @@ public class SpecDirective extends BaseDirective {
}
@Override
public String getReplacementText() {
prefix = CommonUtils.removeRedundantSpaces(getCaretInfo().before.substring(0, getCaretInfo().before.length() - getCaretInfo().prefix_word.length()));
prefix = Utils_.removeRedundantSpaces(getCaretInfo().before.substring(0, getCaretInfo().before.length() - getCaretInfo().prefix_word.length()));
word = get_word();
suffix = CommonUtils.removeRedundantSpaces(getCaretInfo().after.substring(getCaretInfo().suffix_word.length()));
suffix = Utils_.removeRedundantSpaces(getCaretInfo().after.substring(getCaretInfo().suffix_word.length()));
String pp = prefix.replace(" ", "");
String ps = suffix.replace(" ", "");
if (!pp.isEmpty() && (pp.charAt(pp.length() - 1) != ',') && (pp.charAt(pp.length() - 1) != '('))

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI.Editor;
import Common.Utils.CommonUtils;
import Common.Utils.Utils_;
import _VisualDVM.Current;
import _VisualDVM.GlobalData.GlobalDatabase;
import _VisualDVM.Global;
@@ -46,7 +46,7 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
highlighter = (RSyntaxTextAreaHighlighter) getHighlighter();
autoComplete = new SapforAutoComplete(this);
//-------------------------
float font_size = (float) ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.EditorFontSize).toInt32();
float font_size = (float) ((GlobalDatabase) Utils_.db).settings.get(SettingName.EditorFontSize).toInt32();
setFont(getFont().deriveFont(font_size));
//-------------------------
setText(Utils.ReadAllText(file.file).replace("\r", " "));
@@ -151,7 +151,7 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
painter
));
} catch (BadLocationException ex) {
CommonUtils.MainLog.PrintException(ex);
Utils_.MainLog.PrintException(ex);
}
}
}
@@ -167,7 +167,7 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
Pair<Long, Integer> p = file.gcov_info.line_info.get(lineNum);
Color color = never;
if (p.getKey() > 0) {
color = (p.getValue() >= ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.GCOVLimit).toInt32()) ?
color = (p.getValue() >= ((GlobalDatabase) Utils_.db).settings.get(SettingName.GCOVLimit).toInt32()) ?
new Color(255, 255, (100 - p.getValue()), 90) : null;
}
if (color != null) {

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI;
import Common.Visual.CommonUI;
import Common.Visual.UI_;
import Common.Visual.Fonts.VisualiserFonts;
import _VisualDVM.Visual.UI;
@@ -41,7 +41,7 @@ public class FilesHyperlinksPanel extends JPanel {
}
});
Hyperlinks.setLayoutOrientation(JList.VERTICAL);
Hyperlinks.setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.Hyperlink));
Hyperlinks.setFont(UI_.getTheme().Fonts.get(VisualiserFonts.Hyperlink));
add(Hyperlinks, BorderLayout.CENTER);
}
}

View File

@@ -1,5 +1,5 @@
package _VisualDVM.ProjectData.Files.UI;
import Common.Visual.CommonUI;
import Common.Visual.UI_;
import _VisualDVM.Global;
import Common.Visual.Fonts.VisualiserFonts;
import Common.Visual.Trees.StyledTreeCellRenderer;
@@ -23,7 +23,7 @@ public class FilesTreeCellRenderer extends StyledTreeCellRenderer {
File dir = (File) o;
setIcon(new ImageIcon(getClass().getResource("/icons/Folder.png")));
setText(dir.getName());
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain));
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
} else if (o instanceof DBProjectFile) {
DBProjectFile file = (DBProjectFile) o;
if (Global.files_multiselection) {
@@ -32,8 +32,8 @@ public class FilesTreeCellRenderer extends StyledTreeCellRenderer {
setIcon(file.GetIcon());
}
setText(file.file.getName());
if (file.IsMain()) setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreeBold));
else setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreePlain));
if (file.IsMain()) setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreeBold));
else setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreePlain));
if (file.state.equals(FileState.Excluded)) {
Map attributes = getFont().getAttributes();
attributes.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON);