Skip to content
Snippets Groups Projects
Commit 0e5ca488 authored by Markus Alexander Kuppe's avatar Markus Alexander Kuppe
Browse files

Display absolute path to spec/module file on the Toolbox's status line

instead of on the editor's content description. The latter wastes too
much screen estate.

[Refactor][Toolbox]
parent 7b900d41
No related branches found
No related tags found
No related merge requests found
...@@ -90,8 +90,6 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca ...@@ -90,8 +90,6 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca
addPage(tlaEditorIndex, tlaEditor, tlaEditorInput); addPage(tlaEditorIndex, tlaEditor, tlaEditorInput);
setPageText(tlaEditorIndex, "TLA Module"); setPageText(tlaEditorIndex, "TLA Module");
setDescription();
} catch (PartInitException e) } catch (PartInitException e)
{ {
// I hope you don't choke swallowing all those exceptions... // I hope you don't choke swallowing all those exceptions...
...@@ -283,7 +281,6 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca ...@@ -283,7 +281,6 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca
{ {
FileEditorInput fin = (FileEditorInput) newInput; FileEditorInput fin = (FileEditorInput) newInput;
setPartName(fin.getFile().getName()); setPartName(fin.getFile().getName());
setDescription();
} }
} }
} }
...@@ -349,22 +346,20 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca ...@@ -349,22 +346,20 @@ public class TLAEditorAndPDFViewer extends FormEditor implements INavigationLoca
return tlaEditor; return tlaEditor;
} }
/** @Override
* Sets the text that appears above the text viewer. public void setFocus() {
* Currently, this is the full file path. super.setFocus();
*/
private void setDescription() // Show the OS's location of this spec in the Toolbox's status line (bottom
{ // left). Before, this was shown in this editor's content description but this
IEditorInput input = getEditorInput(); // wastes too much space.
if (input != null) final IEditorInput input = getEditorInput();
{ if (input != null) {
if (input instanceof FileEditorInput) if (input instanceof FileEditorInput) {
{
FileEditorInput fin = (FileEditorInput) input; FileEditorInput fin = (FileEditorInput) input;
setContentDescription(fin.getPath().toOSString()); tlaEditor.setStatusMessage(String.format("%s [ %s ]", getPartName(), fin.getPath().toOSString()));
} else } else {
{ tlaEditor.setStatusMessage(input.getName());
setContentDescription(input.getName());
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment