Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.requests.ChangeBoundsRequest;

import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
Expand Down Expand Up @@ -123,7 +121,7 @@ protected static boolean validateJavaInfo(JavaInfo newInfo) throws Exception {
}
// validate only java bean objects
String source = newInfo.getCreationSupport().add_getSource(null);
return !StringUtils.contains(source, "%parent%") && !StringUtils.contains(source, "%child%");
return !source.contains("%parent%") && !source.contains("%child%");
}

protected static boolean acceptDropNonVisualBeans() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;

import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
Expand Down Expand Up @@ -530,7 +529,7 @@ private static boolean isPreferredRoot(JavaInfo root) {
{
int position = root.getCreationSupport().getNode().getStartPosition();
String endOfLineComment = root.getEditor().getEndOfLineComment(position);
if (StringUtils.contains(endOfLineComment, "@wbp.parser.preferredRoot")) {
if (endOfLineComment != null && endOfLineComment.contains("@wbp.parser.preferredRoot")) {
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import org.eclipse.gef.EditPart;

import org.apache.commons.lang3.StringUtils;

import java.lang.reflect.Constructor;
import java.util.List;

Expand Down Expand Up @@ -106,8 +104,8 @@ private EditPart createEditPart(Object model, Class<?> modelClass) {
{
String modelClassName = modelClass.getName();
if (modelClassName.contains("$")) {
modelClassName = StringUtils.remove(modelClassName, "Info");
modelClassName = StringUtils.remove(modelClassName, "$");
modelClassName = modelClassName.replace("Info", "");
modelClassName = modelClassName.replace("$", "");
EditPart editPart = createEditPart(model, modelClass, modelClassName, "");
if (editPart != null) {
return editPart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.ErrorDialog;

import org.apache.commons.lang3.StringUtils;
import org.osgi.service.prefs.BackingStoreException;

import java.io.ByteArrayInputStream;
Expand Down Expand Up @@ -76,7 +75,7 @@ public boolean visit(IEclipsePreferences childNode) throws BackingStoreException
return true;
}
// exclude all which not relative do WindowBuilder
if (!StringUtils.contains(childNode.absolutePath(), PREFERENCES_PREFIX)) {
if (!childNode.absolutePath().contains(PREFERENCES_PREFIX)) {
excludesList.add(childNode.name());
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import org.eclipse.wb.internal.core.utils.StringUtilities;
import org.eclipse.wb.internal.core.utils.check.Assert;

import org.apache.commons.lang3.StringUtils;

/**
* Describes category of {@link Property}.
*
Expand Down Expand Up @@ -109,7 +107,7 @@ public static PropertyCategory get(String text, PropertyCategory defaultCategory
return HIDDEN;
}
// system
if (StringUtils.startsWith(text, "system(")) {
if (text.startsWith("system(")) {
String systemText = text;
systemText = StringUtilities.removeStart(systemText, "system(");
systemText = StringUtilities.removeEnd(systemText, ")");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jdt.core.dom.MethodInvocation;

import org.apache.commons.lang3.StringUtils;

import java.beans.PropertyDescriptor;
import java.text.MessageFormat;
import java.util.HashMap;
Expand Down Expand Up @@ -83,7 +81,7 @@ public final void setBeanType(Class<?> beanType) throws Exception {
if (m_parserBeanType != null
&& m_parserPropertyReference != null
&& m_parserPropertyType == null) {
String propertyName = StringUtils.remove(m_parserPropertyReference, "\"");
String propertyName = m_parserPropertyReference.replace("\"", "");
for (PropertyDescriptor descriptor : BeanSupport.getPropertyDescriptors(m_parserBeanType)) {
if (propertyName.equals(descriptor.getName())) {
m_parserPropertyType = descriptor.getPropertyType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private static String prepareLabelsFields(List<String> resultLabels,
line);
}
// prepare "label" and "field" code
int lastSpaceIndex = StringUtils.lastIndexOf(line, " ");
int lastSpaceIndex = line.lastIndexOf(" ");
String label = line.substring(0, lastSpaceIndex).trim();
String fieldCode = line.substring(lastSpaceIndex).trim();
// convert "fieldCode" into IField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.Image;

import org.apache.commons.lang3.StringUtils;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
Expand Down Expand Up @@ -232,7 +230,7 @@ public void endVisit(ObjectInfo objectInfo) throws Exception {
private static void fixJLabelWithHTML(Component component) throws Exception {
if (component instanceof JLabel label) {
String text = label.getText();
if (StringUtils.containsIgnoreCase(text, "<html>")) {
if (text.toLowerCase().contains("<html>")) {
SwingImageUtils.createComponentShotAWT(component);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ private static String getNormalizedActionText(String text) {
text = text.substring(0, index);
}
}
text = StringUtils.remove(text, "&");
text.replace("&", "");
return text;
}

Expand Down
Loading