-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In response to issue #1090. Goals for this overlay are a simple and modern UI/UX for finding/replacing in eclipse.
- Loading branch information
Maximilian Wittmer
authored and
Maximilian Wittmer
committed
Jan 23, 2024
1 parent
c1cf342
commit 6fb672b
Showing
29 changed files
with
1,644 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+315 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/dlcl16/select_next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+315 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/dlcl16/select_prev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+366 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/elcl16/select_next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+364 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/elcl16/select_prev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+500 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/case_sensitive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+117 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/close_replace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+366 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/open_replace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+159 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/regex_gear.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+311 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/replace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+631 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/replace_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+259 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/search_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+394 Bytes
bundles/org.eclipse.ui.workbench.texteditor/icons/full/obj16/whole_word.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions
35
....texteditor/src/org/eclipse/ui/internal/findandreplace/FindReplaceLogicFindAllStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
public class FindReplaceLogicFindAllStatus implements IFindReplaceLogicStatus { | ||
private int selectCount; | ||
|
||
public FindReplaceLogicFindAllStatus(int selectCount) { | ||
if (selectCount <= 0) { | ||
// invalid value - what to do? Throw an exception?! @HeikoKlare | ||
} | ||
this.selectCount = selectCount; | ||
} | ||
|
||
public int getSelectCount() { | ||
return selectCount; | ||
} | ||
|
||
@Override | ||
public <T> T visit(IFindReplaceLogicStatusVisitor<T> visitor) { | ||
return visitor.visit(this); | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...kbench.texteditor/src/org/eclipse/ui/internal/findandreplace/FindReplaceLogicMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
/** | ||
* Avoid using this class. It is used as a glue to correctly map to the | ||
* error-messages generated by RegEx-Errors which are directly displayed in | ||
* plain text. | ||
* | ||
* Prefer using and extending {@link FindReplaceLogicStatus} | ||
*/ | ||
public class FindReplaceLogicMessage implements IFindReplaceLogicStatus { | ||
|
||
private String message; | ||
|
||
public FindReplaceLogicMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
@Override | ||
public <T> T visit(IFindReplaceLogicStatusVisitor<T> visitor) { | ||
return visitor.visit(this); | ||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...xteditor/src/org/eclipse/ui/internal/findandreplace/FindReplaceLogicReplaceAllStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
public class FindReplaceLogicReplaceAllStatus implements IFindReplaceLogicStatus { | ||
private int replaceCount; | ||
|
||
public FindReplaceLogicReplaceAllStatus(int replaceCount) { | ||
this.replaceCount = replaceCount; | ||
} | ||
|
||
public int getReplaceCount() { | ||
return replaceCount; | ||
} | ||
|
||
@Override | ||
public <T> T visit(IFindReplaceLogicStatusVisitor<T> visitor) { | ||
return visitor.visit(this); | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...rkbench.texteditor/src/org/eclipse/ui/internal/findandreplace/FindReplaceLogicStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
public class FindReplaceLogicStatus implements IFindReplaceLogicStatus { | ||
|
||
public enum MessageCode { | ||
NO_MATCH, | ||
NONE, WRAPPED, READONLY, | ||
} | ||
|
||
private MessageCode messageCode; | ||
|
||
public FindReplaceLogicStatus(MessageCode errorCode) { | ||
this.messageCode = errorCode; | ||
} | ||
|
||
public MessageCode getMessageCode() { | ||
return messageCode; | ||
} | ||
|
||
@Override | ||
public <T> T visit(IFindReplaceLogicStatusVisitor<T> visitor) { | ||
return visitor.visit(this); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...kbench.texteditor/src/org/eclipse/ui/internal/findandreplace/IFindReplaceLogicStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
/** | ||
* Marker interface for all Status-objects that a Find/Replace-Operation could | ||
* return | ||
*/ | ||
public interface IFindReplaceLogicStatus { | ||
public <T> T visit(IFindReplaceLogicStatusVisitor<T> visitor); | ||
} |
27 changes: 27 additions & 0 deletions
27
...texteditor/src/org/eclipse/ui/internal/findandreplace/IFindReplaceLogicStatusVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Vector Informatik GmbH and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Vector Informatik GmbH - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.ui.internal.findandreplace; | ||
|
||
public interface IFindReplaceLogicStatusVisitor<T> { | ||
public T visit(IFindReplaceLogicStatus status); | ||
|
||
public T visit(FindReplaceLogicReplaceAllStatus status); | ||
|
||
public T visit(FindReplaceLogicStatus status); | ||
|
||
public T visit(FindReplaceLogicMessage status); | ||
|
||
public T visit(FindReplaceLogicFindAllStatus status); | ||
|
||
} |
Oops, something went wrong.