Skip to content

Commit

Permalink
Added proper page object cast
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeche committed Jan 13, 2014
1 parent 7a1fd7d commit 0339236
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static IEditorPart getActiveEditor() {
* @return
*/
public static IEditorPart getTextEditor(IEditorPart editor) {
if (editor instanceof MultiPageEditorPart && editor.getSelectedPage() instanceof IEditorPart) {
if (editor instanceof MultiPageEditorPart && ((MultiPageEditorPart) editor).getSelectedPage() instanceof IEditorPart) {
IEditorPart currentPage = (IEditorPart) ((MultiPageEditorPart) editor).getSelectedPage();

if (currentPage instanceof ITextEditor) {
Expand Down

0 comments on commit 0339236

Please sign in to comment.