Skip to content

Formatting and rename package for GenContext #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions sqldev/sqldeveloper.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<updates version="2.0"
xmlns="http://xmlns.oracle.com/jdeveloper/updatecenter"
xmlns:u="http://xmlns.oracle.com/jdeveloper/update">
<u:update id="org.utplsql.sqldev">
<u:name>#EXTENSION_NAME#</u:name>
<u:version>#EXTENSION_VERSION#</u:version>
<u:author>#EXTENSION_OWNER#</u:author>
<u:author-url>http://utplsql.org/</u:author-url>
xmlns="http://xmlns.oracle.com/jdeveloper/updatecenter"
xmlns:u="http://xmlns.oracle.com/jdeveloper/update">
<u:update id="org.utplsql.sqldev">
<u:name>#EXTENSION_NAME#</u:name>
<u:version>#EXTENSION_VERSION#</u:version>
<u:author>#EXTENSION_OWNER#</u:author>
<u:author-url>http://utplsql.org/</u:author-url>
<u:description><![CDATA[#EXTENSION_DESCRIPTION#]]></u:description>
<u:requirements>
<u:requires-extension id="oracle.sqldeveloper" minVersion="#MIN_SQLDEV_VERSION#"/>
<u:requires-extension id="oracle.sqldeveloper"
minVersion="#MIN_SQLDEV_VERSION#" />
</u:requirements>
<u:bundle-url>https://github.com/utPLSQL/utPLSQL-SQLDeveloper/releases/download/v#EXTENSION_SHORT_VERSION#/#EXTENSION_DEPLOYABLE#</u:bundle-url>
</u:update>
<u:bundle-url>https://github.com/utPLSQL/utPLSQL-SQLDeveloper/releases/download/v#EXTENSION_SHORT_VERSION#/#EXTENSION_DEPLOYABLE#
</u:bundle-url>
</u:update>
</updates>
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import oracle.ide.editor.Editor
import org.utplsql.sqldev.UtplsqlWorksheet
import org.utplsql.sqldev.dal.UtplsqlDao
import org.utplsql.sqldev.model.URLTools
import org.utplsql.sqldev.model.oddgen.GenContext
import org.utplsql.sqldev.model.preference.PreferenceModel
import org.utplsql.sqldev.oddgen.TestTemplate
import org.utplsql.sqldev.oddgen.model.GenContext
import org.utplsql.sqldev.parser.UtplsqlParser

class UtplsqlController implements Controller {
Expand Down Expand Up @@ -196,16 +196,16 @@ class UtplsqlController implements Controller {

private def void populateGenContext(GenContext genContext, PreferenceModel preferences) {
genContext.generateFiles = preferences.generateFiles
genContext.outputDirectory = preferences.outputDirectory
genContext.outputDirectory = preferences.outputDirectory
genContext.testPackagePrefix = preferences.testPackagePrefix.toLowerCase
genContext.testPackageSuffix = preferences.testPackageSuffix.toLowerCase
genContext.testUnitPrefix = preferences.testUnitPrefix.toLowerCase
genContext.testUnitSuffix = preferences.testUnitSuffix.toLowerCase
genContext.numberOfTestsPerUnit = preferences.numberOfTestsPerUnit
genContext.generateComments = preferences.generateComments
genContext.disableTests = preferences.disableTests
genContext.suitePath = preferences.suitePath.toLowerCase
genContext.indentSpaces = preferences.indentSpaces
genContext.numberOfTestsPerUnit = preferences.numberOfTestsPerUnit
genContext.generateComments = preferences.generateComments
genContext.disableTests = preferences.disableTests
genContext.suitePath = preferences.suitePath.toLowerCase
genContext.indentSpaces = preferences.indentSpaces
}

private def getGenContext(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.utplsql.sqldev.oddgen.model
package org.utplsql.sqldev.model.oddgen

import java.sql.Connection
import org.eclipse.xtend.lib.annotations.Accessors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PreferenceModel extends HashStructureAdapter {
static final String KEY_NUMBER_OF_TESTS_PER_UNIT = "numberOfTestsPerUnit"
static final String KEY_CHECK_GENERATE_UTPLSQL_TEST = "checkGenerateUtplsqlTest"
static final String KEY_GENERATE_COMMENTS = "generateComments"
static final String KEY_DISABLE_TESTS = "disableTests"
static final String KEY_DISABLE_TESTS = "disableTests"
static final String KEY_SUITE_PATH="suitePath"
static final String KEY_INDENT_SPACES="indentSpaces"
static final String KEY_GENERATE_FILES="generateFiles"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import org.oddgen.sqldev.generators.model.Node
import org.oddgen.sqldev.generators.model.NodeTools
import org.oddgen.sqldev.plugin.templates.TemplateTools
import org.utplsql.sqldev.dal.UtplsqlDao
import org.utplsql.sqldev.model.oddgen.GenContext
import org.utplsql.sqldev.model.preference.PreferenceModel
import org.utplsql.sqldev.resources.UtplsqlResources
import org.utplsql.sqldev.oddgen.model.GenContext

class TestGenerator implements OddgenGenerator2 {

Expand All @@ -56,17 +56,17 @@ class TestGenerator implements OddgenGenerator2 {
val context = new GenContext()
context.objectType = node.toObjectType
context.objectName = node.toObjectName
context.generateFiles = node.params.get(GENERATE_FILES) == YES
context.outputDirectory = node.params.get(OUTPUT_DIRECTORY)
context.generateFiles = node.params.get(GENERATE_FILES) == YES
context.outputDirectory = node.params.get(OUTPUT_DIRECTORY)
context.testPackagePrefix = node.params.get(TEST_PACKAGE_PREFIX).toLowerCase
context.testPackageSuffix = node.params.get(TEST_PACKAGE_SUFFIX).toLowerCase
context.testUnitPrefix = node.params.get(TEST_UNIT_PREFIX).toLowerCase
context.testUnitSuffix = node.params.get(TEST_UNIT_SUFFIX).toLowerCase
context.numberOfTestsPerUnit = Integer.valueOf(node.params.get(NUMBER_OF_TESTS_PER_UNIT))
context.generateComments = node.params.get(GENERATE_COMMENTS) == YES
context.disableTests = node.params.get(DISABLE_TESTS) == YES
context.suitePath = node.params.get(SUITE_PATH).toLowerCase
context.indentSpaces = Integer.valueOf(node.params.get(INDENT_SPACES))
context.numberOfTestsPerUnit = Integer.valueOf(node.params.get(NUMBER_OF_TESTS_PER_UNIT))
context.generateComments = node.params.get(GENERATE_COMMENTS) == YES
context.disableTests = node.params.get(DISABLE_TESTS) == YES
context.suitePath = node.params.get(SUITE_PATH).toLowerCase
context.indentSpaces = Integer.valueOf(node.params.get(INDENT_SPACES))
return context
}

Expand Down Expand Up @@ -101,7 +101,7 @@ class TestGenerator implements OddgenGenerator2 {
«ENDIF»
«ENDIF»
«ENDFOR»
'''
'''

override isSupported(Connection conn) {
var ret = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.List
import org.utplsql.sqldev.dal.UtplsqlDao
import org.utplsql.sqldev.oddgen.model.GenContext
import org.utplsql.sqldev.model.oddgen.GenContext

class TestTemplate {
var GenContext context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<context scope="global">
<preset name="Default">
<map action="utplsql.test">
<accel>alt shift T</accel>
</map>
<map action="utplsql.generate">
<accel>alt shift G</accel>
</map>
</preset>
<preset name="Default MacOS X">
<map action="utplsql.test">
<accel>alt shift T</accel>
</map>
<map action="utplsql.generate">
<accel>alt shift G</accel>
</map>
</preset>
<preset name="Default">
<map action="utplsql.test">
<accel>alt shift T</accel>
</map>
<map action="utplsql.generate">
<accel>alt shift G</accel>
</map>
</preset>
<preset name="Default MacOS X">
<map action="utplsql.test">
<accel>alt shift T</accel>
</map>
<map action="utplsql.generate">
<accel>alt shift G</accel>
</map>
</preset>
</context>