Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhat Çelik committed Jul 10, 2015
2 parents 6ca7652 + 2487bcb commit 20bf915
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 52 deletions.
Binary file modified Source/eu.modelwriter.writer.markers/icons/sample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 22 additions & 21 deletions Source/eu.modelwriter.writer.markers/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,51 @@
<menu
label="ModelWriter"
path="additions"
icon="icons/sample.gif"
id="Writer.menu">
<separator
name="group">
</separator>
</menu>
<action
class="eu.modelwriter.writer.markers.actions.CreateMarkerAction"
id="eu.modelwriter.writer.markers.create.marker"
label="Mark"
enablesFor="1"
menubarPath="Writer.menu/group"
>
</action>
<action
class="eu.modelwriter.writer.markers.actions.CreateAllMarkerAction"
id="eu.modelwriter.writer.markers.createall.marker"
label="Mark All"
enablesFor="1"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.CountMarkersForFile"
id="eu.modelwriter.writer.markers.filecount.marker"
label="Count Markers"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.DeleteMarkerAction"
id="eu.modelwriter.writer.markers.delete.marker"
label="Delete Marker"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.DeleteAllMarkerAction"
id="eu.modelwriter.writer.markers.deleteall.marker"
label="Delete All Markers"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.DeleteMarkerAction"
id="eu.modelwriter.writer.markers.delete.marker"
label="Delete Marker"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.wizards.internal.MarkerMappingAction"
id="eu.modelwriter.writer.markers.mapping.marker"
label="Map Marker"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.CreateAllMarkerAction"
id="eu.modelwriter.writer.markers.createall.marker"
label="Mark All"
enablesFor="1"
menubarPath="Writer.menu/group">
</action>
<action
class="eu.modelwriter.writer.markers.actions.CreateMarkerAction"
id="eu.modelwriter.writer.markers.create.marker"
label="Mark"
enablesFor="1"
menubarPath="Writer.menu/group"
>
</action>
</objectContribution>
</extension>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,18 @@ public String getHyperlinkText() {
@Override
public void open() {
try {
IFile file = (IFile) MarkerActivator.getEditor().getEditorInput()
.getAdapter(IFile.class);
IFile file = (IFile) MarkerActivator.getEditor().getEditorInput().getAdapter(IFile.class);

IMarker beMapped = MarkerFactory.findMarker(file,
fUrlRegion.getOffset());
IMarker beMapped = MarkerFactory.findMarker(file, fUrlRegion.getOffset());

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.showView("eu.modelwriter.writer.markers.views.sourceview");

ArrayList<MarkElement> sourceElements = null;
try {
if ((beMapped != null) && (beMapped.getAttribute(
MarkElement.getSourceAttributeName()) != null)) {
if ((beMapped != null) && (beMapped.getAttribute(MarkElement.getSourceAttributeName()) != null)) {
sourceElements = Serialization.getInstance()
.fromString((String) beMapped.getAttribute(
MarkElement.getSourceAttributeName()));
.fromString((String) beMapped.getAttribute(MarkElement.getSourceAttributeName()));
SourceView.setColumns(sourceElements);
} else {
SourceView.setColumns(new ArrayList<MarkElement>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,18 @@ public String getHyperlinkText() {
@Override
public void open() {
try {
IFile file = (IFile) MarkerActivator.getEditor().getEditorInput().getAdapter(IFile.class);

IFile file = (IFile) MarkerActivator.getEditor().getEditorInput()
.getAdapter(IFile.class);

IMarker beMapped = MarkerFactory.findMarker(file,
fUrlRegion.getOffset());
IMarker beMapped = MarkerFactory.findMarker(file, fUrlRegion.getOffset());

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.showView("eu.modelwriter.writer.markers.views.targetview");

ArrayList<MarkElement> targetElements = null;
try {
if ((beMapped != null) && (beMapped.getAttribute(
MarkElement.getTargetAttributeName()) != null)) {
if ((beMapped != null) && (beMapped.getAttribute(MarkElement.getTargetAttributeName()) != null)) {
targetElements = Serialization.getInstance()
.fromString((String) beMapped.getAttribute(
MarkElement.getTargetAttributeName()));
.fromString((String) beMapped.getAttribute(MarkElement.getTargetAttributeName()));
TargetView.setColumns(targetElements);
} else {
TargetView.setColumns(new ArrayList<MarkElement>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,15 @@ public void createPartControl(Composite parent) {
targetViewer.addDoubleClickListener(new IDoubleClickListener() {
@Override
public void doubleClick(DoubleClickEvent event) {
IStructuredSelection selection = (IStructuredSelection) event
.getSelection();
IStructuredSelection selection = (IStructuredSelection) event.getSelection();

try {
IDE.openEditor(
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage(),
MarkElement.getMarker(
(MarkElement) selection.getFirstElement()));
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
MarkElement.getMarker((MarkElement) selection.getFirstElement()));
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ public String getTitle() {
return "ID";
}

public int getWidth() {
return 210;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ public String getTitle() {
return "Length";
}

public int getWidth() {
return 50;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public String getTitle() {
}

public int getWidth() {
return 100;
return 75;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ public String getTitle() {
return "Offset";
}

public int getWidth() {
return 50;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public String getTitle() {
}

public int getWidth() {
return 444;
return 350;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public String getTitle() {
}

public int getWidth() {
return 300;
return 350;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ public String getTitle() {
return "ID";
}

public int getWidth() {
return 210;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ public String getTitle() {
return "Length";
}

public int getWidth() {
return 50;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public String getTitle() {
}

public int getWidth() {
return 100;
return 75;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ public String getTitle() {
return "Offset";
}

public int getWidth() {
return 50;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public String getTitle() {
}

public int getWidth() {
return 444;
return 350;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public String getTitle() {
}

public int getWidth() {
return 300;
return 350;
}

}

0 comments on commit 20bf915

Please sign in to comment.