Move common Prolog predicates to 'gerrit' package

Because user code will need to import our common rules, move them
to a shorter name "gerrit". This is not likely to collide with any
classes in a running server as we will eventually narrow down the
set of classes available to the PrologEnvironment to a smaller set
than the entire running server, and we aren't likely to ever use a
3rd party library from the gerrit.com domain.

Change-Id: I8f111ea2cb58229159d3a72c081a3808cc6c3438
This commit is contained in:
Shawn O. Pearce
2011-06-15 09:35:07 -07:00
parent 92d912bc5c
commit 1418b1beb0
9 changed files with 12 additions and 17 deletions

View File

@@ -12,20 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.rules.common;
package com.google.gerrit.rules;
import com.google.gerrit.common.data.ApprovalType;
import com.google.gerrit.common.data.ApprovalTypes;
import com.google.gerrit.reviewdb.ApprovalCategory;
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
import com.google.gerrit.rules.PrologTestCase;
import com.google.inject.AbstractModule;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class CommonRulesTest extends PrologTestCase {
public class GerritCommonTest extends PrologTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
@@ -35,7 +34,7 @@ public class CommonRulesTest extends PrologTestCase {
verifiedCategory()
));
load("common_rules_test.pl", new AbstractModule() {
load("gerrit_common_test.pl", new AbstractModule() {
@Override
protected void configure() {
bind(ApprovalTypes.class).toInstance(types);

View File

@@ -12,7 +12,7 @@
%% See the License for the specific language governing permissions and
%% limitations under the License.
:- package 'com.google.gerrit.rules.common'.
:- package 'gerrit'.
%% not_same