Проблема с категориями сайта обновления в Eclipse 3.4

Напишите функцию, которая работает во время выполнения. Тогда позвони. Что-то вроде:

bool less(string a, string b)
{
  auto ap = a.splitter(".").map!(x => to!int(x));
  auto bp = b.splitter(".").map!(x => to!int(x));
  while (!ap.empty && !bp.empty)
  {
    if (ap.front < bp.front) return true;
    ap.popFront; bp.popFront;
  }
  return ap.empty;
}
static if (less("1.2.12", "1.2.2"))
  pragma(msg, "it's less");
else
  pragma(msg, "it's not less");

Вы можете вызывать нормальные функции во время компиляции. Это то, что в D мы называем CTFE (оценка функции времени компиляции).

По словам Уолтера Брайта (из моей памяти) «D обладает уникальной способностью запускать код D во время компиляции».

5
задан Craig Angus 11 October 2008 в 14:44
поделиться

3 ответа

Это, кажется, известная проблема, из-за новой системы настройки 'p2'.

Посмотрите это обсуждение и эту ошибку. То, что это, кажется, говорит..., "остаются помещенными до 3.5M3 и затем пробуют его снова".

4
ответ дан 15 December 2019 в 01:15
поделиться

This solution works for me:

  1. Use the PDE update site project to create the site.xml and build your plugins. Make sure you set the category here.
  2. Delete the artifacts.xml and content.xml created by the update site build.
  3. Use the P2 Metadata Generator to generate your artifacts and content files. I use the compress option so I'm getting jars.
  4. The update site should include: the site.xml, content & artifacts jars, features and plugins folders.

If you follow this procedure, it will work just fine in Eclipse 3.3 and 3.4. Naturally, you should automate this process with Ant.

Important notes:

  • I never got the metadata generator Ant task to work, so I invoke it in its' Java form (the second example in the link above).
  • Make sure you clear the artifacts and content xmls before the generation
  • Inputs: site.xml and built plugins/features folders
  • Specify the metadataRepositoryName which is the update site title (shown to the user in some cases)

I'll do my best to blog about it soon... Let me know if you have any questions.

0
ответ дан 15 December 2019 в 01:15
поделиться

Мне кажется, что мне удалось поместить тег, определяющий категорию в site.xml, перед тегом, включающим тег другой категории. Если вы добавите категорию с помощью редактора eclipse после добавления функции, это все испортит ...

0
ответ дан 15 December 2019 в 01:15
поделиться
Другие вопросы по тегам:

Похожие вопросы: