Now I create a new plug-in project, and there are icons/true.png and icons/ error-png images in the directory. Then I have a package in which I want to create an image array and load these two images. The following is my usage method:
public class TableViewerLabelProvider implements ITableLabelProvider {
private Image[] images = new Image[] { new Image(null,getClass().getResourceAsStream("/icons/true.png")),
new Image(null, getClass().getResourceAsStream("/icons/error.png")) };
}
При запуске программы сообщается о следующей ошибке:
!ENTRY org.eclipse.ui 4 0 2024-05-13 14:44:22.961
!MESSAGE Необработанное исключение цикла событий
!STACK 0
java.lang.IllegalArgumentException: Аргумент не может быть нулевым
в org.eclipse.swt.SWT.error(SWT.java: 4903)
в org.eclipse.swt.SWT.error(SWT.java:4837)
в org.eclipse.swt.SWT.error(SWT.java:4808)
в org .eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:152)
в org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:25)
в org.eclipse.swt .graphics.ImageData.(ImageData.java:334)
на org.eclipse.swt.graphics.Image.(Image.java:593)
на com.hinge.aptool.wizard.table.TableViewerLabelProvider . (TableViewerLabelProvider.java:8)
I tried to add the picture to the build path, but an error was reported,may I ask how to debug this, where to modify?
Подробнее здесь: https://stackoverflow.com/questions/784 ... in-modules
Как разработка плагинов eclipse динамически загружает изображения в подключаемые модули? ⇐ JAVA
Программисты JAVA общаются здесь
1715583302
Anonymous
Now I create a new plug-in project, and there are icons/true.png and icons/ error-png images in the directory. Then I have a package in which I want to create an image array and load these two images. The following is my usage method:
public class TableViewerLabelProvider implements ITableLabelProvider {
private Image[] images = new Image[] { new Image(null,getClass().getResourceAsStream("/icons/true.png")),
new Image(null, getClass().getResourceAsStream("/icons/error.png")) };
}
При запуске программы сообщается о следующей ошибке:
!ENTRY org.eclipse.ui 4 0 2024-05-13 14:44:22.961
!MESSAGE Необработанное исключение цикла событий
!STACK 0
java.lang.IllegalArgumentException: Аргумент не может быть нулевым
в org.eclipse.swt.SWT.error(SWT.java: 4903)
в org.eclipse.swt.SWT.error(SWT.java:4837)
в org.eclipse.swt.SWT.error(SWT.java:4808)
в org .eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:152)
в org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:25)
в org.eclipse.swt .graphics.ImageData.(ImageData.java:334)
на org.eclipse.swt.graphics.Image.(Image.java:593)
на com.hinge.aptool.wizard.table.TableViewerLabelProvider . (TableViewerLabelProvider.java:8)
I tried to add the picture to the build path, but an error was reported,may I ask how to debug this, where to modify?
Подробнее здесь: [url]https://stackoverflow.com/questions/78470516/how-does-eclipse-plug-in-development-dynamically-load-images-in-plug-in-modules[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия