mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
removing unused code
This commit is contained in:
@@ -334,7 +334,6 @@ public abstract class LocalContribution extends Contribution {
|
||||
}
|
||||
|
||||
File oldFolder = getFolder();
|
||||
|
||||
try {
|
||||
Util.copyDir(oldFolder, contribFolder);
|
||||
} catch (IOException e) {
|
||||
@@ -344,15 +343,6 @@ public abstract class LocalContribution extends Contribution {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (!getFolder().renameTo(contribFolder)) {
|
||||
status.setErrorMessage("Could not move " + getTypeName() +
|
||||
" \"" + getName() + "\" to the sketchbook.");
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
return getType().load(base, contribFolder);
|
||||
}
|
||||
|
||||
@@ -397,10 +387,7 @@ public abstract class LocalContribution extends Contribution {
|
||||
final ContribProgressMonitor pm,
|
||||
final StatusPanel status) {
|
||||
// TODO: replace with SwingWorker [jv]
|
||||
new Thread(() -> remove(base,
|
||||
pm,
|
||||
status,
|
||||
ContributionListing.getInstance()), "Contribution Uninstaller").start();
|
||||
new Thread(() -> remove(base, pm, status, ContributionListing.getInstance()), "Contribution Uninstaller").start();
|
||||
}
|
||||
|
||||
|
||||
@@ -411,14 +398,6 @@ public abstract class LocalContribution extends Contribution {
|
||||
pm.startTask("Removing", ContribProgressMonitor.UNKNOWN);
|
||||
|
||||
boolean doBackup = Preferences.getBoolean("contribution.backup.on_remove");
|
||||
// if (getType().requiresRestart()) {
|
||||
// if (!doBackup || (doBackup && backup(editor, false, status))) {
|
||||
// if (setDeletionFlag(true)) {
|
||||
// contribListing.replaceContribution(this, this);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
boolean success;
|
||||
if (getType() == ContributionType.MODE) {
|
||||
boolean isModeActive = false;
|
||||
ModeContribution m = (ModeContribution) this;
|
||||
@@ -440,20 +419,12 @@ public abstract class LocalContribution extends Contribution {
|
||||
}
|
||||
|
||||
if (getType() == ContributionType.TOOL) {
|
||||
/*
|
||||
ToolContribution t = (ToolContribution) this;
|
||||
Iterator<Editor> iter = editor.getBase().getEditors().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Editor ed = iter.next();
|
||||
ed.clearToolMenu();
|
||||
}
|
||||
t.clearClassLoader(editor.getBase());
|
||||
*/
|
||||
// menu will be rebuilt below with the refreshContribs() call
|
||||
base.clearToolMenus();
|
||||
((ToolContribution) this).clearClassLoader();
|
||||
}
|
||||
|
||||
boolean success;
|
||||
if (doBackup) {
|
||||
success = backup(true, status);
|
||||
} else {
|
||||
@@ -466,17 +437,11 @@ public abstract class LocalContribution extends Contribution {
|
||||
}
|
||||
|
||||
if (success) {
|
||||
// this was just rebuilding the tool menu in one editor, which happens
|
||||
// yet again down below with the call to refreshInstalled() [fry 150828]
|
||||
// if (getType() == ContributionType.TOOL) {
|
||||
// editor.removeTool();
|
||||
// }
|
||||
|
||||
try {
|
||||
// TODO: run this in SwingWorker done() [jv]
|
||||
EventQueue.invokeAndWait(() -> {
|
||||
Contribution advertisedVersion =
|
||||
contribListing.getAvailableContribution(LocalContribution.this);
|
||||
contribListing.getAvailableContribution(LocalContribution.this);
|
||||
|
||||
if (advertisedVersion == null) {
|
||||
contribListing.removeContribution(LocalContribution.this);
|
||||
|
||||
@@ -82,10 +82,6 @@ class StatusPanel extends JPanel {
|
||||
label.setEditable(false);
|
||||
label.setOpaque(false);
|
||||
label.setContentType("text/html");
|
||||
// bodyRule = "a, body { font-family: " + buttonFont.getFamily() + "; " +
|
||||
// "font-size: " + buttonFont.getSize() + "pt; color: black; text-decoration: none;}";
|
||||
// bodyRule = "";
|
||||
// bodyRule = DetailPanel.getBodyStyle();
|
||||
label.addHyperlinkListener(e -> {
|
||||
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
|
||||
if (e.getURL() != null) {
|
||||
|
||||
3
todo.txt
3
todo.txt
@@ -16,7 +16,8 @@ X removed weird double call of installPreviouslyFailed()
|
||||
X remove unused icon code from ManagerTabs
|
||||
X implement updateTheme()
|
||||
X remove the extra 2-pixel line at the top
|
||||
_ currently uses prepareGraphics(), do we need to remove that?
|
||||
o currently uses prepareGraphics(), do we need to remove that?
|
||||
X looks like nope, that was sorted out separately
|
||||
_ allow update of the current Mode
|
||||
|
||||
_ an incompatible Mode prevents the PDE from quitting after last window is closed
|
||||
|
||||
Reference in New Issue
Block a user