Skip to content

Commit

Permalink
[1885] The PreferencesHelper does not check the case if the input of the
Browse files Browse the repository at this point in the history
editor is null 

Bug: 1885
Change-Id: I7d95c8658c52b08e175454214564e6a12346edda
Signed-off-by: cong-bang.do <docongbang1993@gmail.com>
  • Loading branch information
bang-dc committed Jan 3, 2018
1 parent 1271285 commit c1bf7e6
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -170,6 +170,7 @@ public static IProject getSelectedCapellaProject() {
capellaProject = resourceFile.getProject();
}
} else if ((activePage != null) && (activePage.getActiveEditor() != null)
&& (activePage.getActiveEditor().getEditorInput() != null)
&& (activePage.getActiveEditor().getEditorInput().getName() != null)) {
capellaProject = getProjectByEditorName(activePage.getActiveEditor().getEditorInput().getName());
}
Expand Down Expand Up @@ -447,7 +448,8 @@ public static List<IFile> retrieveUserDefinedPreferenceFiles(ISelectionProvider
public boolean visit(IResource resource) throws CoreException {
IProject prj = resource != null ? resource.getProject() : null;
IProject configurationProject = (prj != null) && prj.isOpen() && (prj.getReferencedProjects().length > 0)
? prj.getReferencedProjects()[0] : null;
? prj.getReferencedProjects()[0]
: null;
if ((null != configurationProject)) {
IFolder preferenceFolder = (configurationProject.getProject() != null)
&& (configurationProject.getProject().getFolder(".settings/") != null) //$NON-NLS-1$
Expand Down

0 comments on commit c1bf7e6

Please sign in to comment.