Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-4135

Formatter profile creation error when not selecting an initial profile

    Details

      Description

      1. Open the formatter preferences
      2. Click to add a new profile.
      3. When there is only the default profile, the selection for the profile base in the drop-down is empty.
      4. Do not change the drop-box value and type in a name for the profile.
      5. Click OK.

      Result:
      The dialog stays open and the log indicate an error.

       
      java.lang.ArrayIndexOutOfBoundsException: -1
      	at java.util.ArrayList.get(ArrayList.java:324)
      	at java.util.Collections$UnmodifiableList.get(Collections.java:1154)
      	at com.aptana.formatter.ui.preferences.CreateProfileDialog.okPressed(CreateProfileDialog.java:174)
      	at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
      	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      	at org.eclipse.jface.window.Window.open(Window.java:801)
      	at com.aptana.formatter.ui.preferences.AbstractFormatterSelectionBlock.createNewProfile(AbstractFormatterSelectionBlock.java:480)
      	at com.aptana.formatter.ui.preferences.AbstractFormatterSelectionBlock$3.widgetSelected(AbstractFormatterSelectionBlock.java:318)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      	at org.eclipse.jface.window.Window.open(Window.java:801)
      	at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:211)
      	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
      	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
      	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      	at com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
      

        Attachments

          Activity

            People

            • Assignee:
              sgibly Shalom Gibly
              Reporter:
              sgibly Shalom Gibly
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration