Skip to content

Commit

Permalink
Generating product for controlled experiment
Browse files Browse the repository at this point in the history
- Adding the Eclipse RCP product deployment configuration file.
  • Loading branch information
JonnathanRiquelmo committed Dec 8, 2021
1 parent a5680eb commit 3500bc9
Show file tree
Hide file tree
Showing 31 changed files with 780 additions and 7 deletions.
2 changes: 1 addition & 1 deletion org.xtext.unipampa.erdsl.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.xtext.unipampa.erdsl.ide
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.unipampa.erdsl.ide
Bundle-Vendor: My Company
Bundle-Vendor: UNIPAMPA - LESSE
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.unipampa.erdsl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion org.xtext.unipampa.erdsl.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.xtext.unipampa.erdsl.ui
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.unipampa.erdsl.ui
Bundle-Vendor: My Company
Bundle-Vendor: UNIPAMPA - LESSE
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.unipampa.erdsl.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion org.xtext.unipampa.erdsl/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: org.xtext.unipampa.erdsl
Bundle-ManifestVersion: 2
Bundle-Name: org.xtext.unipampa.erdsl
Bundle-Vendor: My Company
Bundle-Vendor: UNIPAMPA - LESSE
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: org.xtext.unipampa.erdsl; singleton:=true
Bundle-ActivationPolicy: lazy
Expand Down
Binary file added org.xtext.unipampa.erdsl/about.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 not shown.
9 changes: 5 additions & 4 deletions org.xtext.unipampa.erdsl/build.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = model/generated/,\
.,\
META-INF/,\
plugin.xml
plugin.xml,\
plugin_customization.ini
source.. = src/,\
src-gen/,\
xtend-gen/
bin.excludes = **/*.mwe2,\
**/*.xtend
additional.bundles = org.eclipse.xtext.xbase,\
Expand Down
547 changes: 547 additions & 0 deletions org.xtext.unipampa.erdsl/org.xtext.unipampa.erdsl.product

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions org.xtext.unipampa.erdsl/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,51 @@
class = "org.xtext.unipampa.erdsl.erDsl.ErDslPackage"
genModel = "model/generated/ErDsl.genmodel" />
</extension>
<extension
id="erdsl_product"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.e4.ui.workbench.swt.E4Application"
name="org.xtext.unipampa.erdsl.product">
<property
name="appName"
value="org.xtext.unipampa.erdsl.product">
</property>
</product>
</extension>
<extension
id="ERtextModeler"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.ui.ide.workbench"
name="ERtext Modeling Tool">
<property
name="aboutText"
value="This tool is a Domain-Specific Language implementation for the conceptual modeling of relational databases.&#x0A;&#x0A;The project for this product is publicly available under the EPL-2.0 license in a GitHub repository (github.com/ProjetoDSL/ERDSL), belonging to the Laboratory of Empirical Studies in Software Engineering (LESSE) research group of the Federal University of Pampa (UNIPAMPA).&#x0A;&#x0A;2019-2021">
</property>
<property
name="aboutImage"
value="about.png">
</property>
<property
name="appName"
value="ERtext Modeling Tool">
</property>
<property
name="startupProgressRect"
value="5,275,445,15">
</property>
<property
name="preferenceCustomization"
value="plugin_customization.ini">
</property>
</product>
</extension>
<extension
point="org.eclipse.ui.splashHandlers">
<splashHandler
class="org.xtext.unipampa.erdsl.splashHandlers.BrowserSplashHandler"
id="org.xtext.unipampa.erdsl.splashHandlers.browser">
</splashHandler>
</extension>
</plugin>
1 change: 1 addition & 0 deletions org.xtext.unipampa.erdsl/plugin_customization.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
Binary file added org.xtext.unipampa.erdsl/splash.bmp
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@

package org.xtext.unipampa.erdsl.splashHandlers;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.splash.AbstractSplashHandler;

/**
* @since 3.3
*
*/
public class BrowserSplashHandler extends AbstractSplashHandler {

private final static String F_BROWSER_URL = "http://www.google.com"; //NON-NLS-1

private Browser fBrowser;

private Button fButton;

private boolean fClose;

/**
*
*/
public BrowserSplashHandler() {
fBrowser = null;
fButton = null;
fClose = false;
}

/*
* (non-Javadoc)
*
* @see org.eclipse.ui.internal.splash.AbstractSplashHandler#init(org.eclipse.swt.widgets.Shell,
* org.eclipse.ui.IWorkbench)
*/
public void init(final Shell splash) {
// Store the shell
super.init(splash);
// Configure the shell layout
configureUISplash();
// Create UI
createUI();
// Create UI listeners
createUIListeners();
// Force the UI to layout
splash.layout(true);
// Keep the splash screen visible and prevent the RCP application from
// loading until the close button is clicked.
doEventLoop();
}

/**
*
*/
private void doEventLoop() {
Shell splash = getSplash();
while (fClose == false) {
if (splash.getDisplay().readAndDispatch() == false) {
splash.getDisplay().sleep();
}
}
}

/**
*
*/
private void createUIListeners() {
// Create the browser listeners
createUIListenersBrowser();
// Create the button listeners
createUIListenersButton();
}

/**
*
*/
private void createUIListenersButton() {
fButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
// NO-OP
}
public void widgetSelected(SelectionEvent e) {
fClose = true;
}
});
}

/**
*
*/
private void createUIListenersBrowser() {
fBrowser.addProgressListener(new ProgressListener() {
public void changed(ProgressEvent event) {
// NO-OP
}
public void completed(ProgressEvent event) {
// Only show the UI when the URL is fully loaded into the
// browser
fBrowser.setVisible(true);
fButton.setVisible(true);
}
});
}

/**
*
*/
private void createUI() {
// Create the web browser
createUIBrowser();
// Create the close button
createUIButton();
}

/**
*
*/
private void createUIButton() {
Shell splash = getSplash();
fButton = new Button(splash, SWT.PUSH);
fButton.setText("Close"); //NON-NLS-1
fButton.setVisible(false);
// Configure the button bounds
configureUIButtonBounds();
// Configure layout data
GridData data = new GridData(SWT.CENTER, SWT.FILL, false, false);
data.widthHint = 80;
fButton.setLayoutData(data);
}

/**
*
*/
private void configureUIButtonBounds() {
Shell splash = getSplash();

int button_x_coord = (splash.getSize().x / 2)
- (fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).x / 2);
int button_y_coord = splash.getSize().y
- fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
int button_x_width = splash.getSize().x;
int button_y_width = fButton.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;

fButton.setBounds(button_x_coord, button_y_coord, button_x_width,
button_y_width);
}

/**
*
*/
private void createUIBrowser() {
fBrowser = new Browser(getSplash(), SWT.NONE);
fBrowser.setUrl(F_BROWSER_URL);
fBrowser.setVisible(false);
// Configure layout data
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
fBrowser.setLayoutData(data);
}

/**
*
*/
private void configureUISplash() {
GridLayout layout = new GridLayout(1, true);
getSplash().setLayout(layout);
}

}

0 comments on commit 3500bc9

Please sign in to comment.