Skip to content

Commit 035c3fe

Browse files
CHE-4010: Remove deprecation related to texteditor
Signed-off-by: Roman Nikitenko <rnikitenko@codenvy.com>
1 parent f1a8807 commit 035c3fe

24 files changed

Lines changed: 85 additions & 1990 deletions

File tree

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/DocumentReadyEvent.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.google.gwt.event.shared.GwtEvent;
1414

1515
import org.eclipse.che.ide.api.editor.document.Document;
16-
import org.eclipse.che.ide.api.editor.texteditor.EditorHandle;
1716

1817
/**
1918
* Event will be fired then document fully initialized in editor
@@ -23,26 +22,13 @@ public class DocumentReadyEvent extends GwtEvent<DocumentReadyHandler> {
2322
/** The type instance for this event. */
2423
public static final Type<DocumentReadyHandler> TYPE = new Type<>();
2524

26-
/** The editor. */
27-
private final EditorHandle editorHandle;
2825
/** The document. */
2926
private final Document document;
3027

31-
/**
32-
* Use {@link DocumentReadyEvent(Document)}
33-
*
34-
*/
35-
@Deprecated
36-
public DocumentReadyEvent(final EditorHandle editorHandle, final Document document) {
37-
this.editorHandle = editorHandle;
38-
this.document = document;
39-
}
40-
4128
/**
4229
* @param document the related initialized document
4330
*/
4431
public DocumentReadyEvent(final Document document) {
45-
this.editorHandle = null;
4632
this.document = document;
4733
}
4834

@@ -59,13 +45,4 @@ protected void dispatch(final DocumentReadyHandler handler) {
5945
public Document getDocument() {
6046
return document;
6147
}
62-
63-
/**
64-
* Don't use this method because {@link EditorHandle} will be removed in next version.
65-
* It useless interface dont have any implementation and don't need in future
66-
*/
67-
@Deprecated
68-
public EditorHandle getEditorHandle() {
69-
return editorHandle;
70-
}
7148
}

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/events/doc/DocReadyWrapper.java

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,29 @@
1010
*******************************************************************************/
1111
package org.eclipse.che.ide.api.editor.events.doc;
1212

13-
import org.eclipse.che.commons.annotation.Nullable;
13+
import com.google.web.bindery.event.shared.EventBus;
14+
import com.google.web.bindery.event.shared.HandlerRegistration;
1415

16+
import org.eclipse.che.commons.annotation.Nullable;
1517
import org.eclipse.che.ide.api.editor.document.DocumentHandle;
1618
import org.eclipse.che.ide.api.editor.events.DocumentReadyEvent;
1719
import org.eclipse.che.ide.api.editor.events.DocumentReadyHandler;
18-
import org.eclipse.che.ide.api.editor.texteditor.EditorHandle;
19-
20-
import com.google.web.bindery.event.shared.EventBus;
21-
import com.google.web.bindery.event.shared.HandlerRegistration;
2220

2321
/**
2422
* Wrapper around components that need to wait for documents to be ready.
2523
*/
2624
public class DocReadyWrapper<T> {
2725

28-
private final EditorHandle editorHandle;
2926
private DocReadyInit<T> docReadyInit;
3027
private final T wrapped;
3128
private HandlerRegistration docReadyRegistration;
3229
private DocumentHandle documentHandle;
3330

34-
public DocReadyWrapper(final EventBus generalEventBus, final EditorHandle editor, final T wrapped) {
35-
this(generalEventBus, editor, null, wrapped);
31+
public DocReadyWrapper(final EventBus generalEventBus, final T wrapped) {
32+
this(generalEventBus, null, wrapped);
3633
}
3734

38-
public DocReadyWrapper(final EventBus generalEventBus, final EditorHandle editor,
39-
@Nullable final DocReadyInit<T> init, final T wrapped) {
40-
this.editorHandle = editor;
35+
public DocReadyWrapper(final EventBus generalEventBus, @Nullable final DocReadyInit<T> init, final T wrapped) {
4136
this.docReadyInit = init;
4237
this.wrapped = wrapped;
4338
this.docReadyRegistration = generalEventBus.addHandler(DocumentReadyEvent.TYPE,
@@ -48,15 +43,7 @@ public void onDocumentReady(final DocumentReadyEvent event) {
4843
if (event == null) {
4944
return;
5045
}
51-
if (event.getEditorHandle() == null) {
52-
return;
53-
}
54-
EditorHandle eventHandle = event.getEditorHandle();
55-
EditorHandle constantHandle = editorHandle;
56-
boolean equal = eventHandle.equals(constantHandle);
57-
if (!equal) {
58-
return;
59-
}
46+
6047
// stop listening DocReady events
6148
if (docReadyRegistration != null) {
6249
docReadyRegistration.removeHandler();

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CompositeEditorWidget.java

Lines changed: 0 additions & 73 deletions
This file was deleted.

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModel.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ public interface CursorModel {
2222
*/
2323
void setCursorPosition(int offset);
2424

25-
2625
/**
2726
* Get cursor position
2827
*
2928
* @return the position of cursor.
3029
*/
3130
Position getCursorPosition();
32-
3331
}

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/CursorModelWithHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*******************************************************************************/
1111
package org.eclipse.che.ide.api.editor.texteditor;
1212

13-
import org.eclipse.che.ide.api.editor.texteditor.CursorModel;
1413
import org.eclipse.che.ide.util.ListenerRegistrar.Remover;
1514

1615
/**

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorHandle.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorInitCallback.java

Lines changed: 0 additions & 112 deletions
This file was deleted.

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorModule.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/EditorResources.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import com.google.gwt.resources.client.ClientBundle;
1414
import com.google.gwt.resources.client.CssResource;
15-
import com.google.gwt.resources.client.ImageResource;
1615

1716
/** Resources interface for the editor. */
1817
public interface EditorResources extends ClientBundle {

0 commit comments

Comments
 (0)