Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
svarog2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Redmine
Redmine
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Brain
svarog2
Commits
74136f8b
Commit
74136f8b
authored
Mar 06, 2019
by
Piotr Różański
Committed by
Marian Dovgialo
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#45487 Removed "Save All" menu entry
parent
f432dcd7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
145 deletions
+1
-145
SaveAllDocumentsAction.java
.../signalml/app/action/document/SaveAllDocumentsAction.java
+0
-76
DocumentFlowIntegrator.java
...ava/org/signalml/app/document/DocumentFlowIntegrator.java
+0
-34
ViewerElementManager.java
...org/signalml/app/view/workspace/ViewerElementManager.java
+0
-13
ViewerMainFrame.java
...java/org/signalml/app/view/workspace/ViewerMainFrame.java
+1
-18
pl.po
...g/src/main/resources/org/signalml/app/resource/i18n/pl.po
+0
-4
No files found.
svarog/src/main/java/org/signalml/app/action/document/SaveAllDocumentsAction.java
deleted
100644 → 0
View file @
f432dcd7
/* SaveAllDocumentsAction.java created 2007-09-10
*
*/
package
org
.
signalml
.
app
.
action
.
document
;
import
static
org
.
signalml
.
app
.
util
.
i18n
.
SvarogI18n
.
_
;
import
java.awt.Window
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.KeyEvent
;
import
java.io.IOException
;
import
org.apache.log4j.Logger
;
import
org.signalml.app.document.DocumentFlowIntegrator
;
import
org.signalml.app.view.common.dialogs.errors.Dialogs
;
import
org.signalml.plugin.export.SignalMLException
;
import
org.signalml.plugin.export.view.AbstractSignalMLAction
;
/** SaveAllDocumentsAction
*
*
* @author Michal Dobaczewski © 2007-2008 CC Otwarte Systemy Komputerowe Sp. z o.o.
*/
public
class
SaveAllDocumentsAction
extends
AbstractSignalMLAction
{
private
static
final
long
serialVersionUID
=
1L
;
protected
static
final
Logger
logger
=
Logger
.
getLogger
(
SaveAllDocumentsAction
.
class
);
private
DocumentFlowIntegrator
documentFlowIntegrator
;
public
SaveAllDocumentsAction
()
{
super
();
setText
(
_
(
"Save All"
));
setIconPath
(
"org/signalml/app/icon/save_all.png"
);
setToolTip
(
_
(
"Save all unsaved documents"
));
setMnemonic
(
KeyEvent
.
VK_S
);
}
@Override
public
void
actionPerformed
(
ActionEvent
ev
)
{
logger
.
debug
(
"Save all documents"
);
try
{
documentFlowIntegrator
.
saveAllDocuments
();
}
catch
(
SignalMLException
ex
)
{
logger
.
error
(
"Failed to save all documents"
,
ex
);
Dialogs
.
showExceptionDialog
((
Window
)
null
,
ex
);
return
;
}
catch
(
IOException
ex
)
{
logger
.
error
(
"Failed to save all documents - i/o exception"
,
ex
);
Dialogs
.
showExceptionDialog
((
Window
)
null
,
ex
);
return
;
}
}
@Override
public
void
setEnabledAsNeeded
()
{
if
(
documentFlowIntegrator
!=
null
)
{
setEnabled
(
documentFlowIntegrator
.
getDocumentManager
().
getDocumentCount
()
>
0
);
}
else
{
setEnabled
(
false
);
}
}
public
DocumentFlowIntegrator
getDocumentFlowIntegrator
()
{
return
documentFlowIntegrator
;
}
public
void
setDocumentFlowIntegrator
(
DocumentFlowIntegrator
documentFlowIntegrator
)
{
this
.
documentFlowIntegrator
=
documentFlowIntegrator
;
}
}
svarog/src/main/java/org/signalml/app/document/DocumentFlowIntegrator.java
View file @
74136f8b
...
...
@@ -524,40 +524,6 @@ public boolean saveDocument(Document document, boolean saveAsOnly) throws IOExce
}
/**
* {@link #saveDocument(Document, boolean) Saves} all documents stored
* in the {@link DocumentManager document manager}.
* @return {@code true} if the operation is successful,
* {@code false} if saving any of the files failed
* @throws IOException TODO never thrown (???)
* @throws SignalMLException if save worker failed to save the document or
* if {@link SignalChecksumWorker checksum worker} was interrupted or
* failed to calculate the checksum
*/
public
boolean
saveAllDocuments
()
throws
IOException
,
SignalMLException
{
boolean
allOk
=
true
;
int
count
;
Document
document
;
int
i
;
boolean
savedOk
;
synchronized
(
documentManager
)
{
count
=
documentManager
.
getDocumentCount
();
for
(
i
=
0
;
i
<
count
;
i
++)
{
document
=
documentManager
.
getDocumentAt
(
i
);
synchronized
(
document
)
{
savedOk
=
saveDocument
(
document
,
false
);
}
allOk
&=
savedOk
;
}
}
return
allOk
;
}
/**
* Creates a {@link OpenDocumentDescriptor descriptor} of a file based
* on a given {@link MRUDEntry} and uses this descriptor to
...
...
svarog/src/main/java/org/signalml/app/view/workspace/ViewerElementManager.java
View file @
74136f8b
...
...
@@ -39,7 +39,6 @@
import
org.signalml.app.action.components.CloseWindowAction
;
import
org.signalml.app.action.document.CloseDocumentAction
;
import
org.signalml.app.action.document.OpenSignalWizardAction
;
import
org.signalml.app.action.document.SaveAllDocumentsAction
;
import
org.signalml.app.action.document.monitor.CheckSignalAction
;
import
org.signalml.app.action.document.monitor.StartMonitorRecordingAction
;
import
org.signalml.app.action.document.monitor.StopMonitorRecordingAction
;
...
...
@@ -273,7 +272,6 @@ public ViewerElementManager(SignalMLOperationMode mode) {
private
ShowBottomPanelAction
showBottomPanelAction
;
private
OpenBookDocumentAction
openBookDocumentAction
;
private
CloseDocumentAction
closeActiveDocumentAction
;
private
SaveAllDocumentsAction
saveAllDocumentsAction
;
private
NewTagAction
newTagAction
;
private
OpenTagAction
openTagAction
;
private
CloseTagAction
closeTagAction
;
...
...
@@ -593,7 +591,6 @@ public JMenu getFileMenu() {
fileMenu
.
add
(
getOpenSignalWizardAction
());
fileMenu
.
add
(
getOpenBookDocumentAction
());
fileMenu
.
add
(
getSaveAllDocumentsAction
());
fileMenu
.
add
(
getCloseActiveDocumentAction
());
fileMenu
.
addSeparator
();
...
...
@@ -793,7 +790,6 @@ public JToolBar getMainToolBar() {
mainToolBar
.
setFloatable
(
false
);
mainToolBar
.
add
(
getOpenSignalWizardAction
());
mainToolBar
.
add
(
getSaveAllDocumentsAction
());
mainToolBar
.
add
(
getCloseActiveDocumentAction
());
mainToolBar
.
add
(
Box
.
createHorizontalGlue
());
...
...
@@ -1377,14 +1373,6 @@ public CloseDocumentAction getCloseActiveDocumentAction() {
return
closeActiveDocumentAction
;
}
public
SaveAllDocumentsAction
getSaveAllDocumentsAction
()
{
if
(
saveAllDocumentsAction
==
null
)
{
saveAllDocumentsAction
=
new
SaveAllDocumentsAction
();
saveAllDocumentsAction
.
setDocumentFlowIntegrator
(
getDocumentFlowIntegrator
());
}
return
saveAllDocumentsAction
;
}
public
NewTagAction
getNewTagAction
()
{
if
(
newTagAction
==
null
)
{
newTagAction
=
new
NewTagAction
(
getActionFocusManager
());
...
...
@@ -1759,7 +1747,6 @@ public void configureAcceletators() {
getOpenTagAction
().
setAccelerator
(
"alt O"
);
getOpenBookDocumentAction
().
setAccelerator
(
"alt B"
);
getCloseTagAction
().
setAccelerator
(
"ctrl alt F4"
);
getSaveAllDocumentsAction
().
setAccelerator
(
"ctrl alt S"
);
getSaveTagAction
().
setAccelerator
(
"alt S"
);
getSaveTagAsAction
().
setAccelerator
(
"ctrl alt shift S"
);
getEditPreferencesAction
().
setAccelerator
(
"ctrl P"
);
...
...
svarog/src/main/java/org/signalml/app/view/workspace/ViewerMainFrame.java
View file @
74136f8b
...
...
@@ -75,7 +75,7 @@
*
* @author Michal Dobaczewski © 2007-2008 CC Otwarte Systemy Komputerowe Sp. z o.o.
*/
public
class
ViewerMainFrame
extends
JFrame
implements
View
,
DocumentManagerListener
,
ViewFocusSelector
{
public
class
ViewerMainFrame
extends
JFrame
implements
View
,
ViewFocusSelector
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -218,8 +218,6 @@ private void bindListeners() {
documentManager
.
addDocumentManagerListener
(
elementManager
.
getTagTreeModel
());
documentManager
.
addDocumentManagerListener
(
elementManager
.
getBookTreeModel
());
documentManager
.
addDocumentManagerListener
(
this
);
actionFocusManager
.
addActionFocusListener
(
documentTabbedPane
);
actionFocusManager
.
addActionFocusListener
(
elementManager
.
getWorkspaceTree
());
...
...
@@ -751,21 +749,6 @@ public void setElementManager(ViewerElementManager elementManager) {
this
.
elementManager
=
elementManager
;
}
@Override
public
void
documentAdded
(
DocumentManagerEvent
e
)
{
elementManager
.
getSaveAllDocumentsAction
().
setEnabledAsNeeded
();
}
@Override
public
void
documentPathChanged
(
DocumentManagerEvent
e
)
{
// this is not interesting
}
@Override
public
void
documentRemoved
(
DocumentManagerEvent
e
)
{
elementManager
.
getSaveAllDocumentsAction
().
setEnabledAsNeeded
();
}
public
void
addBootstrap
(
MainWindowBootstrapTask
task
)
{
bootstrapList
.
add
(
task
);
}
...
...
svarog/src/main/resources/org/signalml/app/resource/i18n/pl.po
View file @
74136f8b
...
...
@@ -4447,10 +4447,6 @@ msgstr "Spełnienie dowolnego (OR)"
msgid
"
Save
"
msgstr
"
Zapisz
"
#:
org
/
signalml
/
app
/
action
/
document
/
SaveAllDocumentsAction
.
java:34
msgid
"
Save
All
"
msgstr
"
Zapisz
wszystko
"
#:
org
/
signalml
/
app
/
method
/
mp5
/
MP5SaveForLaterUseDialog
.
java:73
msgid
"
Save
MP
configuration
"
msgstr
"
Zapisz
konfiguracj
ę
MP
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment