CHE-6844: Fix Git markers on maven multi-module projects (#7753)
parent
f9726f7bfa
commit
7f06d4d248
|
|
@ -125,6 +125,7 @@ import org.eclipse.che.ide.api.parts.EditorTab;
|
|||
import org.eclipse.che.ide.api.parts.PartPresenter;
|
||||
import org.eclipse.che.ide.api.parts.WorkspaceAgent;
|
||||
import org.eclipse.che.ide.api.preferences.PreferencesManager;
|
||||
import org.eclipse.che.ide.api.resources.Container;
|
||||
import org.eclipse.che.ide.api.resources.File;
|
||||
import org.eclipse.che.ide.api.resources.Project;
|
||||
import org.eclipse.che.ide.api.resources.Resource;
|
||||
|
|
@ -1221,8 +1222,12 @@ public class OrionEditorPresenter extends AbstractEditorPresenter
|
|||
resolve.apply(null);
|
||||
return;
|
||||
}
|
||||
|
||||
String vcsName = project.getAttribute("vcs.provider.name");
|
||||
Container parent = getRoot(project);
|
||||
if (!(parent instanceof Project)) {
|
||||
resolve.apply(null);
|
||||
return;
|
||||
}
|
||||
String vcsName = ((Project) parent).getAttribute("vcs.provider.name");
|
||||
VcsChangeMarkerRenderFactory vcsChangeMarkerRenderFactory =
|
||||
vcsChangeMarkerRenderFactoryMap.get(vcsName);
|
||||
if (vcsChangeMarkerRenderFactory != null) {
|
||||
|
|
@ -1233,6 +1238,14 @@ public class OrionEditorPresenter extends AbstractEditorPresenter
|
|||
}));
|
||||
}
|
||||
|
||||
private Container getRoot(Container container) {
|
||||
Container root = container;
|
||||
while (root.getParent() != null) {
|
||||
root = root.getParent();
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWrapLines() {
|
||||
return editorWidget.getTextView().getOptions().getWrapMode();
|
||||
|
|
|
|||
Loading…
Reference in New Issue