Automatic removal of trailing whitespaces in Eclipse does not work even in a nearly consistent way across platforms, versions or even on the same maching within the same workspaces. Saving the same file multiple times even alternates between adding and removing a whitespace on empty block comment lines when saving. Change-Id: I0efd307fd48869ea688eb79aa77c9ba38de5a4a6tags/7.3.0.rc1
@@ -17,10 +17,12 @@ sp_cleanup.always_use_blocks=true | |||
sp_cleanup.always_use_parentheses_in_expressions=false | |||
sp_cleanup.always_use_this_for_non_static_field_access=false | |||
sp_cleanup.always_use_this_for_non_static_method_access=false | |||
sp_cleanup.convert_functional_interfaces=false | |||
sp_cleanup.convert_to_enhanced_for_loop=false | |||
sp_cleanup.correct_indentation=false | |||
sp_cleanup.format_source_code=true | |||
sp_cleanup.format_source_code_changes_only=false | |||
sp_cleanup.insert_inferred_type_arguments=false | |||
sp_cleanup.make_local_variable_final=false | |||
sp_cleanup.make_parameters_final=false | |||
sp_cleanup.make_private_fields_final=true | |||
@@ -36,7 +38,8 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class= | |||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false | |||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false | |||
sp_cleanup.remove_private_constructors=true | |||
sp_cleanup.remove_trailing_whitespaces=true | |||
sp_cleanup.remove_redundant_type_arguments=false | |||
sp_cleanup.remove_trailing_whitespaces=false | |||
sp_cleanup.remove_trailing_whitespaces_all=true | |||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false | |||
sp_cleanup.remove_unnecessary_casts=true | |||
@@ -49,10 +52,13 @@ sp_cleanup.remove_unused_private_methods=true | |||
sp_cleanup.remove_unused_private_types=true | |||
sp_cleanup.sort_members=false | |||
sp_cleanup.sort_members_all=false | |||
sp_cleanup.use_anonymous_class_creation=false | |||
sp_cleanup.use_blocks=true | |||
sp_cleanup.use_blocks_only_for_return_and_throw=false | |||
sp_cleanup.use_lambda=false | |||
sp_cleanup.use_parentheses_in_expressions=false | |||
sp_cleanup.use_this_for_non_static_field_access=true | |||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true | |||
sp_cleanup.use_this_for_non_static_method_access=true | |||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true | |||
sp_cleanup.use_type_arguments=false |
@@ -809,7 +809,8 @@ public class ApplicationConnection implements HasHandlers { | |||
startRequest(); | |||
JSONObject payload = new JSONObject(); | |||
if (!getCsrfToken().equals(ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE)) { | |||
if (!getCsrfToken().equals( | |||
ApplicationConstants.CSRF_TOKEN_DEFAULT_VALUE)) { | |||
payload.put(ApplicationConstants.CSRF_TOKEN, new JSONString( | |||
getCsrfToken())); | |||
} |
@@ -124,7 +124,9 @@ public class Heartbeat { | |||
@Override | |||
public void onError(Request request, Throwable exception) { | |||
getLogger().severe("Exception sending heartbeat: " + exception.getMessage()); | |||
getLogger().severe( | |||
"Exception sending heartbeat: " | |||
+ exception.getMessage()); | |||
// Notify network observers about response status | |||
connection.fireEvent(new ConnectionStatusEvent(0)); | |||
// Don't break the loop |
@@ -87,8 +87,7 @@ public interface LocatorStrategy { | |||
* @return The DOM element identified by {@code path} or null if the element | |||
* could not be located. | |||
*/ | |||
Element getElementByPathStartingAt(String path, | |||
Element root); | |||
Element getElementByPathStartingAt(String path, Element root); | |||
/** | |||
* Locates all elements that match a String locator (path) which identifies | |||
@@ -119,6 +118,5 @@ public interface LocatorStrategy { | |||
* found. | |||
*/ | |||
List<Element> getElementsByPathStartingAt( | |||
String path, Element root); | |||
List<Element> getElementsByPathStartingAt(String path, Element root); | |||
} |
@@ -108,16 +108,14 @@ public class HierarchySection implements Section { | |||
hierarchyPanel.addListener(new SelectConnectorListener() { | |||
@Override | |||
public void select(ServerConnector connector, | |||
Element element) { | |||
public void select(ServerConnector connector, Element element) { | |||
printState(connector, true); | |||
} | |||
}); | |||
analyzeLayoutsPanel.addListener(new SelectConnectorListener() { | |||
@Override | |||
public void select(ServerConnector connector, | |||
Element element) { | |||
public void select(ServerConnector connector, Element element) { | |||
printState(connector, true); | |||
} | |||
}); |
@@ -33,6 +33,5 @@ public interface SelectConnectorListener { | |||
* @param element | |||
* selected element of the connector or null if unknown | |||
*/ | |||
public void select(ServerConnector connector, | |||
Element element); | |||
public void select(ServerConnector connector, Element element); | |||
} |
@@ -444,7 +444,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { | |||
* A "thread local" of sorts, set temporarily so that VOverlayImpl knows | |||
* which VOverlay is using it, so that it can be attached to the correct | |||
* overlay container. | |||
* | |||
* | |||
* TODO this is a strange pattern that we should get rid of when possible. | |||
*/ | |||
protected static VOverlay current; | |||
@@ -971,7 +971,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { | |||
/* | |||
* (non-Javadoc) | |||
* | |||
* | |||
* @see com.google.gwt.user.client.ui.PopupPanel#hide() | |||
*/ | |||
@Override | |||
@@ -981,7 +981,7 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { | |||
/* | |||
* (non-Javadoc) | |||
* | |||
* | |||
* @see com.google.gwt.user.client.ui.PopupPanel#hide(boolean) | |||
*/ | |||
@Override |
@@ -58,8 +58,7 @@ public class DDUtil { | |||
} | |||
public static HorizontalDropLocation getHorizontalDropLocation( | |||
Element element, NativeEvent event, | |||
double leftRightRatio) { | |||
Element element, NativeEvent event, double leftRightRatio) { | |||
int clientX = Util.getTouchOrMouseClientX(event); | |||
// Event coordinates are relative to the viewport, element absolute |
@@ -20,7 +20,8 @@ import com.google.gwt.dom.client.Element; | |||
/** | |||
* Interface implemented by widgets if the drag image used for drag'n'drop | |||
* requires additional initialization/configuration. The method | |||
* {@link #modifyDragImage(Element)} is called for each element in the automatically generated drag image. | |||
* {@link #modifyDragImage(Element)} is called for each element in the | |||
* automatically generated drag image. | |||
* | |||
* @since 7.2 | |||
* @author Vaadin Ltd |
@@ -636,7 +636,8 @@ public class Page implements Serializable { | |||
} | |||
public void init(VaadinRequest request) { | |||
// NOTE: UI.refresh makes assumptions about the semantics of this method. | |||
// NOTE: UI.refresh makes assumptions about the semantics of this | |||
// method. | |||
// It should be kept in sync if this method is changed. | |||
// Extract special parameter sent by vaadinBootstrap.js |
@@ -114,7 +114,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { | |||
* deadlocks unless implemented very carefully. get(long, TimeUnit) | |||
* does not have the same detection since a sensible timeout should | |||
* avoid completely locking up the application. | |||
* | |||
* | |||
* Even though no deadlock could occur after the runnable has been | |||
* run, the check is always done as the deterministic behavior makes | |||
* it easier to detect potential problems. |
@@ -81,9 +81,9 @@ public class ClientRpcWriter implements Serializable { | |||
// + parameterType.getName()); | |||
// } | |||
// } | |||
EncodeResult encodeResult = JsonCodec.encode(invocation.getParameters()[i], | |||
referenceParameter, parameterType, | |||
ui.getConnectorTracker()); | |||
EncodeResult encodeResult = JsonCodec.encode( | |||
invocation.getParameters()[i], referenceParameter, | |||
parameterType, ui.getConnectorTracker()); | |||
paramJson.put(encodeResult.getEncodedValue()); | |||
} | |||
invocationJson.put(paramJson); |
@@ -173,7 +173,8 @@ class NotificationConfigurationImpl implements NotificationConfiguration { | |||
NotificationTypeConfiguration styleSetup = getTypeConf(type); | |||
if (styleSetup == null) { | |||
styleSetup = new NotificationTypeConfiguration(); | |||
ui.getState().notificationConfigurations.put(type.getStyle(), styleSetup); | |||
ui.getState().notificationConfigurations.put(type.getStyle(), | |||
styleSetup); | |||
} | |||
return styleSetup; |
@@ -317,7 +317,8 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
* the position at where the the tab should be added. | |||
* @return the created {@link Tab} | |||
*/ | |||
public Tab addTab(Component tabComponent, String caption, Resource icon, int position) { | |||
public Tab addTab(Component tabComponent, String caption, Resource icon, | |||
int position) { | |||
if (tabComponent == null) { | |||
return null; | |||
} else if (tabs.containsKey(tabComponent)) { | |||
@@ -1070,8 +1071,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
@Override | |||
public Resource getIcon() { | |||
return getResource(ComponentConstants.ICON_RESOURCE | |||
+ tabState.key); | |||
return getResource(ComponentConstants.ICON_RESOURCE + tabState.key); | |||
} | |||
@Override | |||
@@ -1211,8 +1211,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, | |||
@Override | |||
public void setIcon(Resource icon, String iconAltText) { | |||
setResource(ComponentConstants.ICON_RESOURCE + tabState.key, | |||
icon); | |||
setResource(ComponentConstants.ICON_RESOURCE + tabState.key, icon); | |||
tabState.iconAltText = iconAltText; | |||
} | |||
} |
@@ -112,7 +112,7 @@ public class CurrentInstance implements Serializable { | |||
* ThreadLocal should only outlive the referenced object on | |||
* threads that are not doing anything related to Vaadin, which | |||
* should thus never invoke CurrentInstance.get(). | |||
* | |||
* | |||
* At this point, there might also be other values that have | |||
* been collected, so we'll scan the entire map and remove stale | |||
* CurrentInstance objects. Using a ReferenceQueue could make | |||
@@ -250,7 +250,7 @@ public class CurrentInstance implements Serializable { | |||
* CurrentInstance. Without this a reference to an already | |||
* collected instance may be left in the CurrentInstance when it | |||
* really should be restored to null. | |||
* | |||
* | |||
* One example case that this fixes: | |||
* VaadinService.runPendingAccessTasks() clears all current | |||
* instances and then sets everything but the UI. This makes |
@@ -42,7 +42,8 @@ public class VaadinPortletRequestTests { | |||
@Test | |||
public void defaultValueForPortletPreferenceIsNull() { | |||
when(preferences.getValue(anyString(), isNull(String.class))).thenReturn(null); | |||
when(preferences.getValue(anyString(), isNull(String.class))) | |||
.thenReturn(null); | |||
String value = sut.getPortletPreference("foo"); | |||
@@ -43,7 +43,8 @@ public class PrimaryStyleTest extends MultiBrowserTest { | |||
$(ButtonElement.class).id("update-button").click(); | |||
// Verify that the class names where updated as expected. | |||
List<WebElement> updatedElements = driver.findElements(By.className("updated-correctly")); | |||
List<WebElement> updatedElements = driver.findElements(By | |||
.className("updated-correctly")); | |||
assertThat(updatedElements, hasSize(initialElements.size())); | |||
} |
@@ -35,4 +35,4 @@ public class ButtonToggleIcons extends UI { | |||
layout.addComponent(new Button("Toggle icon", iconToggleListener)); | |||
layout.addComponent(new NativeButton("Toggle icon", iconToggleListener)); | |||
} | |||
} | |||
} |
@@ -40,7 +40,7 @@ public class CheckBoxRpcCountTest extends MultiBrowserTest { | |||
// Click on the actual checkbox. | |||
inputElem.click(); | |||
//Have to use waitUntil to make this test more stable. | |||
// Have to use waitUntil to make this test more stable. | |||
waitUntilLabelIsUpdated(countElem, "1 RPC call(s) made."); | |||
// Click on the checkbox label. | |||
@@ -52,7 +52,8 @@ public class CheckBoxRpcCountTest extends MultiBrowserTest { | |||
waitUntilLabelIsUpdated(countElem, "3 RPC call(s) made."); | |||
} | |||
private void waitUntilLabelIsUpdated(final WebElement countElem, final String expectedText) { | |||
private void waitUntilLabelIsUpdated(final WebElement countElem, | |||
final String expectedText) { | |||
waitUntil(new ExpectedCondition<Boolean>() { | |||
@Override | |||
public Boolean apply(WebDriver input) { |
@@ -40,13 +40,16 @@ public class ComboBoxInputPromptTest extends MultiBrowserTest { | |||
ComboBoxElement disabledComboBox = getComboBoxWithCaption("Disabled"); | |||
ComboBoxElement readOnlyComboBox = getComboBoxWithCaption("Read-only"); | |||
assertThat(getInputPromptValue(normalComboBox), is("Normal input prompt")); | |||
assertThat(getInputPromptValue(normalComboBox), | |||
is("Normal input prompt")); | |||
assertThat(getInputPromptValue(disabledComboBox), isEmptyString()); | |||
assertThat(getInputPromptValue(readOnlyComboBox), isEmptyString()); | |||
toggleDisabledAndReadonly(); | |||
assertThat(getInputPromptValue(disabledComboBox), is("Disabled input prompt")); | |||
assertThat(getInputPromptValue(readOnlyComboBox), is("Read-only input prompt")); | |||
assertThat(getInputPromptValue(disabledComboBox), | |||
is("Disabled input prompt")); | |||
assertThat(getInputPromptValue(readOnlyComboBox), | |||
is("Read-only input prompt")); | |||
toggleDisabledAndReadonly(); | |||
assertThat(getInputPromptValue(disabledComboBox), isEmptyString()); |
@@ -52,8 +52,7 @@ public class ComboBoxScrollingWithArrowsTest extends MultiBrowserTest { | |||
// provide any way to access the popup and send keys to it. | |||
// Ticket #13756 | |||
return driver.findElement(By | |||
.className("v-filterselect-input")); | |||
return driver.findElement(By.className("v-filterselect-input")); | |||
} | |||
private void openPopup() { | |||
@@ -70,7 +69,7 @@ public class ComboBoxScrollingWithArrowsTest extends MultiBrowserTest { | |||
dropDownComboBox.sendKeys(Keys.DOWN); | |||
} | |||
assertThat(getSelectedItemText(), is("item " + PAGESIZE)); //item 10 | |||
assertThat(getSelectedItemText(), is("item " + PAGESIZE)); // item 10 | |||
} | |||
private String getSelectedItemText() { | |||
@@ -92,7 +91,8 @@ public class ComboBoxScrollingWithArrowsTest extends MultiBrowserTest { | |||
waitUntilNextPageIsVisible(); | |||
dropDownComboBox.sendKeys(Keys.UP); | |||
assertThat(getSelectedItemText(), is("item " + (PAGESIZE - 1))); //item 9 | |||
assertThat(getSelectedItemText(), is("item " + (PAGESIZE - 1))); // item | |||
// 9 | |||
} | |||
private void waitUntilNextPageIsVisible() { |
@@ -1,6 +1,5 @@ | |||
package com.vaadin.tests.components.datefield; | |||
import com.vaadin.testbench.By; | |||
import com.vaadin.testbench.elements.ButtonElement; | |||
import com.vaadin.testbench.elements.DateFieldElement; | |||
@@ -14,7 +13,8 @@ import java.io.IOException; | |||
public class DateFieldReadOnlyTest extends MultiBrowserTest { | |||
@Test | |||
public void readOnlyDateFieldPopupShouldNotOpen() throws IOException, InterruptedException { | |||
public void readOnlyDateFieldPopupShouldNotOpen() throws IOException, | |||
InterruptedException { | |||
openTestURL(); | |||
compareScreen("initial"); | |||
@@ -29,12 +29,15 @@ public class DateFieldReadOnlyTest extends MultiBrowserTest { | |||
} | |||
private void closePopup() { | |||
findElement(By.className("v-datefield-calendarpanel")).sendKeys(Keys.RETURN); | |||
findElement(By.className("v-datefield-calendarpanel")).sendKeys( | |||
Keys.RETURN); | |||
} | |||
private void openPopup() { | |||
//waiting for openPopup() in TB4 beta1: http://dev.vaadin.com/ticket/13766 | |||
$(DateFieldElement.class).first().findElement(By.tagName("button")).click(); | |||
// waiting for openPopup() in TB4 beta1: | |||
// http://dev.vaadin.com/ticket/13766 | |||
$(DateFieldElement.class).first().findElement(By.tagName("button")) | |||
.click(); | |||
} | |||
private void toggleReadOnly() { |
@@ -9,7 +9,8 @@ import java.io.IOException; | |||
import static org.junit.Assert.*; | |||
public class MoveComponentsFromGridLayoutToInnerLayoutTest extends MultiBrowserTest { | |||
public class MoveComponentsFromGridLayoutToInnerLayoutTest extends | |||
MultiBrowserTest { | |||
@Test | |||
public void buttonIsMovedInsideInnerLayout() throws IOException { |
@@ -47,7 +47,8 @@ public class MenuTooltipTest extends MultiBrowserTest { | |||
public void testToolTipDelay() throws InterruptedException { | |||
openTestURL(); | |||
Coordinates elementCoordinates = getCoordinates($(MenuBarElement.class).first()); | |||
Coordinates elementCoordinates = getCoordinates($(MenuBarElement.class) | |||
.first()); | |||
Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); | |||
@@ -102,8 +102,8 @@ public class NotificationsWaiAria extends TestBase { | |||
.getNotificationConfiguration(); | |||
notificationConf.setAssistivePrefix(typeValue, prefix.getValue()); | |||
notificationConf.setAssistivePostfix(typeValue, postfix.getValue()); | |||
notificationConf | |||
.setAssistiveRole(typeValue, (NotificationRole) role.getValue()); | |||
notificationConf.setAssistiveRole(typeValue, | |||
(NotificationRole) role.getValue()); | |||
n.show(Page.getCurrent()); | |||
} |
@@ -43,12 +43,13 @@ public class WindowMoveListenerTest extends MultiBrowserTest { | |||
waitUntilWindowHasReseted(window, winPos); | |||
} | |||
private void waitUntilWindowHasReseted(final WebElement window, final Point winPos) { | |||
private void waitUntilWindowHasReseted(final WebElement window, | |||
final Point winPos) { | |||
waitUntil(new ExpectedCondition<Boolean>() { | |||
@Override | |||
public Boolean apply(WebDriver input) { | |||
return winPos.x == window.getLocation().x && | |||
winPos.y == window.getLocation().y; | |||
return winPos.x == window.getLocation().x | |||
&& winPos.y == window.getLocation().y; | |||
} | |||
}, 5); | |||
} |
@@ -17,7 +17,8 @@ public class GridLayoutWidthChangeTest extends MultiBrowserTest { | |||
compareScreen("initial"); | |||
$(ButtonElement.class).caption("Reduce GridLayout parent width").first().click(); | |||
$(ButtonElement.class).caption("Reduce GridLayout parent width") | |||
.first().click(); | |||
compareScreen("buttonMoved"); | |||
} |
@@ -36,7 +36,7 @@ public class GridAddReplaceMove extends GridBaseLayoutTestUI { | |||
/* | |||
* (non-Javadoc) | |||
* | |||
* | |||
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server. | |||
* VaadinRequest) | |||
*/ |
@@ -19,7 +19,6 @@ import com.vaadin.annotations.Theme; | |||
import com.vaadin.tests.layouts.layouttester.BaseAddReplaceMove; | |||
import com.vaadin.ui.HorizontalLayout; | |||
public class HAddReplaceMove extends BaseAddReplaceMove { | |||
/** |
@@ -19,7 +19,6 @@ import com.vaadin.annotations.Theme; | |||
import com.vaadin.tests.layouts.layouttester.BaseCaption; | |||
import com.vaadin.ui.HorizontalLayout; | |||
public class HCaption extends BaseCaption { | |||
/** |
@@ -17,7 +17,6 @@ package com.vaadin.tests.layouts.layouttester.VLayout; | |||
import com.vaadin.tests.layouts.layouttester.BaseLayoutExpandTest; | |||
/** | |||
* | |||
* @since |
@@ -17,7 +17,6 @@ package com.vaadin.tests.layouts.layouttester.VLayout; | |||
import com.vaadin.tests.layouts.layouttester.BaseLayoutRegErrorTest; | |||
/** | |||
* | |||
* @since |
@@ -17,7 +17,6 @@ package com.vaadin.tests.layouts.layouttester.VLayout; | |||
import com.vaadin.tests.layouts.layouttester.BaseLayoutSizingTest; | |||
/** | |||
* | |||
* @since |
@@ -37,7 +37,8 @@ public class PushConfigurationLongPollingTest extends PushConfigurationTest { | |||
clearDebugMessages(); | |||
new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); | |||
waitForDebugMessage("Push connection established using long-polling", 10); | |||
waitForDebugMessage("Push connection established using long-polling", | |||
10); | |||
waitForServerCounterToUpdate(); | |||
} | |||
@@ -15,7 +15,6 @@ | |||
*/ | |||
package com.vaadin.tests.push; | |||
public class ReconnectLongPollingTest extends ReconnectTest { | |||
@Override |
@@ -15,7 +15,6 @@ | |||
*/ | |||
package com.vaadin.tests.push; | |||
public class ReconnectStreamingTest extends ReconnectTest { | |||
@Override |
@@ -166,7 +166,8 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { | |||
} | |||
protected WebElement getTooltipElement() { | |||
return getDriver().findElement(com.vaadin.testbench.By.className("v-tooltip-text")); | |||
return getDriver().findElement( | |||
com.vaadin.testbench.By.className("v-tooltip-text")); | |||
} | |||
protected Coordinates getCoordinates(TestBenchElement element) { |
@@ -69,7 +69,6 @@ public class AdjacentElementsWithTooltipsTest extends MultiBrowserTest { | |||
} | |||
private ButtonElement getButton(String caption) { | |||
return $(ButtonElement.class) | |||
.caption(caption).first(); | |||
return $(ButtonElement.class).caption(caption).first(); | |||
} | |||
} |