You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BrowserRuntimeProperties.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /********************************************************************
  2. * Copyright (c) 2007 Contributors. All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v 2.0
  5. * which accompanies this distribution and is available at
  6. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  7. *
  8. * Contributors: IBM Corporation - initial API and implementation
  9. * Helen Hawkins - initial version (bug 148190)
  10. *******************************************************************/
  11. package org.aspectj.tools.ajbrowser.ui;
  12. import org.aspectj.ajde.IRuntimeProperties;
  13. import org.aspectj.ajde.ui.UserPreferencesAdapter;
  14. import org.aspectj.tools.ajbrowser.core.PreferenceStoreConstants;
  15. /**
  16. * AjBrowser implementation of IRuntimeProperties which uses the PreferenceStoreConstant
  17. * to decide which class the user has specified contains the main method
  18. */
  19. public class BrowserRuntimeProperties implements IRuntimeProperties {
  20. private UserPreferencesAdapter preferencesAdapter;
  21. public BrowserRuntimeProperties(UserPreferencesAdapter preferencesAdapter) {
  22. this.preferencesAdapter = preferencesAdapter;
  23. }
  24. public String getClassToExecute() {
  25. return preferencesAdapter.getProjectPreference(PreferenceStoreConstants.RUNTIME_MAINCLASS);
  26. }
  27. public String getExecutionArgs() {
  28. // not implemented by ajbrowser
  29. return null;
  30. }
  31. }