Liquibase autocompletion in eclipse (maven project)

I'm trying to have autocompletion for liquibase.

My project works fine with liquibase, but completion doesn't work.

I'm pretty sure it did work last week, after downloading javadoc/sources from liquibase.

Now, whenever I try to have eclipse autocomplete a changelog xml, I can see this:

Loading reference grammars (sleeping).

It then disappears, and autocompletion doesn't work.

Here is an example changeset header:

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
     xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

    <!--  This changelog is used to validate that liquibase works -->
    <changeSet id="1" author="majoros" >
    </changeSet>

</databaseChangeLog>

EDIT: could very well be a proxy issue. I was briefly fully connected to the internet (don't ask...), and it's working now. Still, my coworkers should have it working, too (and I'd like to understand).

Answers


Eclipse should be able to use autocomplete on XML files that have a descriptor (or whatever it's called).

Liquibase's wiki has some examples for database change sets. These all include references to xsd files. These provide information on the structure of the XML.

Sample XML for 1.9:

<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
</databaseChangeLog>

Sample XML for 2.0:

<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd
    http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
</databaseChangeLog>

Eclipse fetches the xsd files from the web so an Internet connection is required. If you're behind a proxy you have to configure Eclipse to use a proxy. This might explain why it didn't work at first.

To configure a proxy in Eclipse:

Window > Preferences > General > Network connections


Need Your Help

Parse multiline BBCode with C# Regex

c# regex multiline phpbb bbcode

I'm working on a C# class to parse BBCodes out of text pulled from a database for PHPBB posts.

How do you sign your Firefox extensions?

firefox build-automation certificate code-signing

I have developed a couple of extensions for Firefox, and am annoyed that it is so hard to get the extension signed. When an extension isn't signed, it says "Author not verified" when it is install...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.