◐ Shell
reader mode source ↗
Skip to content
Merged
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ Please file your bug reports, enhancement requests, questions and other support
3. [Create a branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/), commit and publish your changes and enhancements
4. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/)

## How to Build

1. [Download](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) and install SQL Developer 21.4.2
2. [Download](https://maven.apache.org/download.cgi) and install Apache Maven 3.8.3
3. [Download](https://git-scm.com/downloads) and install a git command line client
4. Clone the utPLSQL-SQLDeveloper repository
5. Open a terminal window in the utPLSQL-SQLDeveloper root folder and type
Expand All @@ -154,7 +155,7 @@ Please file your bug reports, enhancement requests, questions and other support

6. Run maven build by the following command

mvn -Dsqldev.basedir=/Applications/SQLDeveloper21.4.2.app/Contents/Resources/sqldeveloper -DskipTests=true clean package

Amend the parameter sqldev.basedir to match the path of your SQL Developer installation. This folder is used to reference Oracle jar files which are not available in public Maven repositories
7. The resulting file ```utplsql_for_SQLDev_x.x.x-SNAPSHOT.zip``` in the ```target``` directory can be installed within SQL Developer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private void run() {
PreferenceModel preferences;
try {
preferences = PreferenceModel.getInstance(Preferences.getPreferences());
} catch (NoClassDefFoundError error) {
// not running in SQL Developer (in tests)
preferences = PreferenceModel.getInstance(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,30 @@ private CharSequence getCode() {
StringBuilder sb = new StringBuilder();
if (!debug) {
if (preferences.isResetPackage()) {
sb.append("EXECUTE dbms_session.reset_package;\n");
}
sb.append("SET SERVEROUTPUT ON SIZE UNLIMITED\n");
if (preferences.isClearScreen()) {
sb.append("CLEAR SCREEN\n");
}
if (pathList.size() == 1) {
sb.append("EXECUTE ut.run('");
sb.append(pathList.get(0));
sb.append("');\n");
} else {
// we want a horizontal dense output because we resize the worksheet to fit the command in common cases
sb.append("EXECUTE ut.run(ut_varchar2_list(");
sb.append(StringTools.getCSV(pathList, "").replace("\n", ""));
sb.append("));\n");
}
} else {
sb.append("BEGIN\n");
sb.append(" ut.run(\n");
sb.append(" ut_varchar2_list(\n");
sb.append(StringTools.getCSV(pathList, 9));
sb.append(" )\n");
sb.append(" );\n");
sb.append("END;\n");
}
return sb;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ private void syncDetailTab() {
private PreferenceModel getPreferenceModel() {
try {
return PreferenceModel.getInstance(Preferences.getPreferences());
} catch (NoClassDefFoundError e) {
// running outside of SQL Developer
return PreferenceModel.getInstance(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ public void setupDefaultPreferences() {
preferences = PreferenceModel.getInstance(null);
// the second call will call will succeed and use preferences from user.home
// this ensures that the test and the runner use the same preferences
preferences = PreferenceModel.getInstance(Preferences.getPreferences());
} finally {
// set defaults manually, since all tests are using the same preference store
preferences.setShowSuccessfulTests(true);
Expand Down
Loading
Toggle all file notes Toggle all file annotations